Changeset 259 for scripts/usr/local
- Timestamp:
- Mar 17, 2016, 6:16:40 PM (9 years ago)
- Location:
- scripts/usr/local/lib/7dtd
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
scripts/usr/local/lib/7dtd/VERSION
r257 r259 1 Version: 9 52 Release: 2016-0 2-161 Version: 96 2 Release: 2016-03-17 3 3 -
scripts/usr/local/lib/7dtd/commands/start.sh
r258 r259 47 47 rm -f $(getInstancePath $1)/logs/output_log.txt 48 48 49 for H in $(getHooksFor serverPreStart ); do49 for H in $(getHooksFor serverPreStart $1); do 50 50 $H $1 51 51 done … … 58 58 OPTS="-logfile $LOG -configfile=$(getInstancePath $1)/config.xml" 59 59 60 LC_ALL=C LD_LIBRARY_PATH=$SDTD_BASE/engine $SSD --start $SSD_PID $SSD_DAEMON $SSD_USER --chdir $SDTD_BASE/engine --exec $SDTD_BASE/engine/7DaysToDieServer.x86 -- $OPTS > $(getInstancePath $1)/logs/stdout.log 2>&1 60 # if [ "$(uname -m)" = "x86_64" ]; then 61 # SERVER_EXE="7DaysToDieServer.x86_64" 62 # else 63 SERVER_EXE="7DaysToDieServer.x86" 64 # fi 65 66 67 LC_ALL=C LD_LIBRARY_PATH=$SDTD_BASE/engine $SSD --start $SSD_PID $SSD_DAEMON $SSD_USER --chdir $SDTD_BASE/engine --exec $SDTD_BASE/engine/$SERVER_EXE -- $OPTS > $(getInstancePath $1)/logs/stdout.log 2>&1 61 68 sleep 1 62 69 63 for H in $(getHooksFor serverPostStart ); do70 for H in $(getHooksFor serverPostStart $1); do 64 71 $H $1 65 72 done -
scripts/usr/local/lib/7dtd/commands/stop.sh
r258 r259 42 42 res=$(isRunning $1) 43 43 if [ $res -eq 1 ]; then 44 for H in $(getHooksFor serverPreStop ); do44 for H in $(getHooksFor serverPreStop $1); do 45 45 $H $1 46 46 done … … 68 68 rm $(getInstancePath $1)/7dtd.pid 69 69 70 for H in $(getHooksFor serverPostStop ); do70 for H in $(getHooksFor serverPostStop $1); do 71 71 $H $1 72 72 done -
scripts/usr/local/lib/7dtd/common.sh
r258 r259 229 229 # Params: 230 230 # 1: Hook name 231 # 2: Instance name 231 232 # Returns: 232 233 # Names of hook files 233 234 getHooksFor() { 235 if [ -n $2 ]; then 236 if [ -d $SDTD_BASE/$(getInstancePath $2)/hooks/$1 ]; then 237 local H 238 for H in $SDTD_BASE/$(getInstancePath $2)/hooks/$1/*.sh; do 239 echo "$H" 240 done 241 fi 242 fi 234 243 if [ -d $SDTD_BASE/hooks/$1 ]; then 235 244 local H -
scripts/usr/local/lib/7dtd/monitor-log.sh
r258 r259 42 42 logPlayerConnect $INSTANCE "$entityId" "$name" "$steamId" "$ip" 43 43 44 for H in $(getHooksFor playerConnect ); do44 for H in $(getHooksFor playerConnect $INSTANCE); do 45 45 $H $INSTANCE "$entityId" "$name" "$steamId" "$ip" 46 46 done … … 53 53 logPlayerDisconnect $INSTANCE "$entityId" 54 54 55 for H in $(getHooksFor playerDisconnect ); do55 for H in $(getHooksFor playerDisconnect $INSTANCE); do 56 56 $H $INSTANCE "$playerId" "$entityId" "$NICKNAME" "$STEAMID" 57 57 done … … 61 61 echo "$(timestamp): $1" >> $CHATLOG 62 62 63 for H in $(getHooksFor chat ); do63 for H in $(getHooksFor chat $INSTANCE); do 64 64 $H $INSTANCE "$1" 65 65 done … … 72 72 echo "$(timestamp): Player \"$name\" executed \"$cmd\"" >> $COMMANDLOG 73 73 74 for H in $(getHooksFor remoteCommand ); do74 for H in $(getHooksFor remoteCommand $INSTANCE); do 75 75 $H $INSTANCE "$cmd" "$name" 76 76 done … … 83 83 echo "$(timestamp): Telnet from \"$ip\" executed \"$cmd\"" >> $COMMANDLOG 84 84 85 for H in $(getHooksFor telnetCommand ); do85 for H in $(getHooksFor telnetCommand $INSTANCE); do 86 86 $H $INSTANCE "$cmd" "$ip" 87 87 done
Note:
See TracChangeset
for help on using the changeset viewer.