Changeset 9 for scripts/usr/local
- Timestamp:
- May 15, 2014, 8:38:37 PM (11 years ago)
- Location:
- scripts/usr/local/bin
- Files:
-
- 3 added
- 1 deleted
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
scripts/usr/local/bin/7dtd-backup.sh
r1 r9 18 18 fi 19 19 20 $RSYNC -a --delete --numeric-ids --delete-excluded $SDTD_ ROOT/Data/Worlds/./ $NewBackup20 $RSYNC -a --delete --numeric-ids --delete-excluded $SDTD_BASE/instances/./ $NewBackup 21 21 touch $NewBackup 22 22 -
scripts/usr/local/bin/7dtd-kill.sh
r1 r9 1 1 #!/bin/bash 2 /etc/init.d/7dtd.sh stop 2 # Tries to stop the 7dtd instance given as first parameter. 3 # Returns: 4 # 0 : Done 5 # 1 : Was not running 6 # 2 : No instance name given 7 # 3 : No such instance 8 9 . /usr/local/bin/7dtd-common.sh 10 checkRootLoadConf 11 12 checkInstance $1 13 14 res=$(isRunning $1) 15 if [ $res -eq 1 ]; then 16 telnetCommand shutdown 17 start-stop-daemon --stop --pidfile $(getInstancePath $1)/7dtd.pid 18 rm $(getInstancePath $1)/7dtd.pid 19 echo "Done" 20 exit 0 21 else 22 echo "7dtd instance $1 is NOT running" 23 exit 1 24 fi -
scripts/usr/local/bin/7dtd-start.sh
r1 r9 1 1 #!/bin/bash 2 /etc/init.d/7dtd.sh start 2 # Tries to start the 7dtd instance given as first parameter. 3 # Returns: 4 # 0 : Done 5 # 1 : Was already running 6 # 2 : No instance name given 7 # 3 : No such instance 8 # 5 : Unknown error when starting engine 9 10 . /usr/local/bin/7dtd-common.sh 11 checkRootLoadConf 12 13 checkInstance $1 14 15 res=$(isRunning $1) 16 if [ $res -eq 0 ]; then 17 if [ ! `pgrep Xvfb` ]; then 18 echo "Xvfb not yet running. Starting..." 19 su -c "/usr/bin/Xvfb :1 -screen 0 640x480x16" $SDTD_USER &> /dev/null & 20 sleep 3 21 fi 22 export DISPLAY=localhost:1.0 23 24 SSD_PID="--pidfile $(getInstancePath $1)/7dtd.pid --make-pidfile" 25 SSD_DAEMON="--background --no-close" 26 SSD_USER="--chuid $SDTD_USER:$SDTD_GROUP --user $SDTD_USER" 27 OPTS="-quit -batchmode -nographics -configfile=$(getInstancePath $1)/serverconfig.xml -dedicated" 28 29 start-stop-daemon --start $SSD_PID $SSD_DAEMON $SSD_USER --chdir $SDTD_ROOT --exec $WINE -- $SDTD_ROOT/7DaysToDie.exe $OPTS > $(getInstancePath $1)/stdout.log 2>&1 30 sleep 1 31 res=$(isRunning $1) 32 if [ $res -eq 1 ]; then 33 echo "Done!" 34 exit 0 35 else 36 echo "Failed!" 37 rm -f $(getInstancePath $1)/7dtd.pid 38 exit 5 39 fi 40 else 41 echo "7dtd instance $1 is already running" 42 exit 1 43 fi -
scripts/usr/local/bin/7dtd-update.sh
r1 r9 1 1 #!/bin/bash 2 . /etc/7dtd.conf 2 . /usr/local/bin/7dtd-common.sh 3 checkRootLoadConf 4 5 for I in $SDTD_BASE/instances/*; do 6 ins=`basename $I` 7 run=$(isRunning $ins) 8 if [ $run -eq 1 ]; then 9 echo "At least one instance is still running." 10 echo "Before updating the engine please stop all instances!" 11 exit 1 12 fi 13 done 3 14 4 15 if [ ! -e $STEAMCMD_ROOT ]; then … … 13 24 cd $STEAMCMD_ROOT 14 25 15 ./steamcmd.sh +@sSteamCmdForcePlatformType windows +login $STEAM_USER $STEAM_PASS +force_install_dir $SDTD_ROOT +app_update 251570validate +quit26 ./steamcmd.sh +@sSteamCmdForcePlatformType windows +login $STEAM_USER $STEAM_PASS +force_install_dir $SDTD_ROOT "+app_update 251570" validate +quit 16 27 chown $SDTD_USER.$SDTD_GROUP -R $SDTD_ROOT 17 28 … … 19 30 cp $SDTD_ROOT/Install/32bit/mono.dll $SDTD_ROOT/7DaysToDie_Data/Mono/ 20 31 cp $SDTD_ROOT/Install/32bit/SteamworksManaged.dll $SDTD_ROOT/7DaysToDie_Data/Managed/ 21 cp $SDTD_ ROOT/../msvcr100.dll $SDTD_ROOT/32 cp $SDTD_BASE/msvcr100.dll $SDTD_ROOT/
Note:
See TracChangeset
for help on using the changeset viewer.