Changeset 481 for scripts/usr
- Timestamp:
- Nov 14, 2023, 2:48:08 PM (13 months ago)
- Location:
- scripts/usr/local/lib/7dtd
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
scripts/usr/local/lib/7dtd/commands/instances.sh
r480 r481 75 75 76 76 $EDITOR $IPATH/config.xml 77 configSetAutoParameters "$INSTANCE"78 77 79 78 if [ -f "$SDTD_BASE/templates/admins.xml" ]; then -
scripts/usr/local/lib/7dtd/commands/start.sh
r480 r481 56 56 SSD_DAEMON="--background --no-close" 57 57 SSD_USER="--chuid $SDTD_USER:$SDTD_GROUP --user $SDTD_USER" 58 OPTS="-logfile $LOG -nographics -configfile=$(getInstancePath $1)/config.xml "58 OPTS="-logfile $LOG -nographics -configfile=$(getInstancePath $1)/config.xml -TelnetEnabled=true -AdminFileName=admins.xml -UserDataFolder=$(getInstancePath $1) " 59 59 60 60 if [ "$(uname -m)" = "x86_64" ]; then -
scripts/usr/local/lib/7dtd/commands/updateengine.sh
r480 r481 174 174 PASSWORDARG=-betapassword $BRANCHPASSWORD 175 175 fi 176 #echo ./steamcmd.sh + login anonymous +force_install_dir $SDTD_BASE/engine+app_update 294420 -validate -beta $BRANCHNAME $PASSWORDARG +quit177 ./steamcmd.sh + login anonymous +force_install_dir $SDTD_BASE/engine+app_update 294420 -validate -beta $BRANCHNAME $PASSWORDARG +quit176 #echo ./steamcmd.sh +force_install_dir $SDTD_BASE/engine +login anonymous +app_update 294420 -validate -beta $BRANCHNAME $PASSWORDARG +quit 177 ./steamcmd.sh +force_install_dir $SDTD_BASE/engine +login anonymous +app_update 294420 -validate -beta $BRANCHNAME $PASSWORDARG +quit 178 178 179 179 if [ -d /usr/local/lib/7dtd/server-fixes ]; then -
scripts/usr/local/lib/7dtd/common.sh
r479 r481 120 120 local APPMANIFEST=$(find $SDTD_BASE/engine -type f -name "appmanifest_294420.acf") 121 121 if [ -f "$APPMANIFEST" ]; then 122 LOCAL=$(grep betakey"$APPMANIFEST" | tr '[:blank:]"' ' ' | tr -s ' ' | cut -d\ -f3)122 LOCAL=$(grep -i '"betakey"' "$APPMANIFEST" | tr '[:blank:]"' ' ' | tr -s ' ' | cut -d\ -f3) 123 123 if [[ -z $LOCAL ]]; then 124 124 LOCAL="public" … … 141 141 local APPMANIFEST=$(find $SDTD_BASE/engine -type f -name "appmanifest_294420.acf") 142 142 if [ -f "$APPMANIFEST" ]; then 143 LOCAL=$(grep buildid"$APPMANIFEST" | tr '[:blank:]"' ' ' | tr -s ' ' | cut -d\ -f3)143 LOCAL=$(grep -i '"buildid"' "$APPMANIFEST" | tr '[:blank:]"' ' ' | tr -s ' ' | cut -d\ -f3) 144 144 if [ $(isANumber "$LOCAL") -eq 0 ]; then 145 145 LOCAL=0 … … 159 159 local APPMANIFEST=$(find $SDTD_BASE/engine -type f -name "appmanifest_294420.acf") 160 160 if [ -f "$APPMANIFEST" ]; then 161 LOCAL=$(grep LastUpdated"$APPMANIFEST" | tr '[:blank:]"' ' ' | tr -s ' ' | cut -d\ -f3)161 LOCAL=$(grep -i '"LastUpdated"' "$APPMANIFEST" | tr '[:blank:]"' ' ' | tr -s ' ' | cut -d\ -f3) 162 162 if [ $(isANumber "$LOCAL") -eq 0 ]; then 163 163 LOCAL=0 -
scripts/usr/local/lib/7dtd/serverconfig.sh
r478 r481 20 20 ## Generic worker functions 21 21 22 23 # Set parameters for current instance that have forced values:24 # - TelnetEnabled must be set so that management scripts can work25 # - AdminFileName is made to point to the local instance admins.xml26 # - SaveGameFolder is made to point to the instance folder27 # - UserDataFolder (for GeneratedWorlds) is made to point to the <user home directory>/serverdata/28 # Params:29 # 1: Instance name30 configSetAutoParameters() {31 setConfigValue "$1" "TelnetEnabled" "true"32 setConfigValue "$1" "AdminFileName" "admins.xml"33 setConfigValue "$1" "SaveGameFolder" "$(getInstancePath "$1")"34 setConfigValue "$1" "UserDataFolder" "$SDTD_BASE/serverdata"35 }36 22 37 23 # Query for an instance name (will be saved in $INSTANCE) … … 78 64 # 3: New value 79 65 setConfigValue() { 66 local XMLSTARLET_OPTS="-L -P" 80 67 local CONF=$(getInstancePath $1)/config.xml 81 $XMLSTARLET ed -L -u "/ServerSettings/property[@name='$2']/@value" -v "$3" $CONF 68 local XPATHBASE="//property[@name='$2']" 69 70 if [ -z $($XMLSTARLET sel -t -v "$XPATHBASE/@name" $CONF) ]; then 71 $XMLSTARLET ed $XMLSTARLET_OPTS \ 72 -s "/*[1]" -t elem -n "property" \ 73 -i "//property[not(@name)]" -t attr -n "name" -v "$2" \ 74 -i "$XPATHBASE" -t attr -n "value" -v "$3" \ 75 $CONF 76 else 77 $XMLSTARLET ed $XMLSTARLET_OPTS -u "$XPATHBASE/@value" -v "$3" $CONF 78 fi 82 79 }
Note:
See TracChangeset
for help on using the changeset viewer.