Skip to content

Commit

Permalink
Merge pull request #140 from jammsen/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
jammsen authored Jan 30, 2024
2 parents 5c1eb69 + 2d254e1 commit 79be23a
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions servermanager.sh
Original file line number Diff line number Diff line change
Expand Up @@ -149,10 +149,6 @@ function setupPalWorldSettingsIni() {
echo "> Setting BuildObjectDeteriorationDamageRate to $BUILD_OBJECT_DETERIORATION_DAMAGE_RATE"
sed -E -i "s/BuildObjectDeteriorationDamageRate=[+-]?([0-9]*[.])?[0-9]+/BuildObjectDeteriorationDamageRate=$BUILD_OBJECT_DETERIORATION_DAMAGE_RATE/" ${GAME_PATH}/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini
fi
if [[ ! -z ${BUILD_OBJECT_DETERIORATION_DAMAGE_RATE+x} ]]; then
echo "> Setting PalAutoHpRegeneRateInSleep to $BUILD_OBJECT_DETERIORATION_DAMAGE_RATE"
sed -E -i "s/PalAutoHpRegeneRateInSleep=[+-]?([0-9]*[.])?[0-9]+/PalAutoHpRegeneRateInSleep=$BUILD_OBJECT_DETERIORATION_DAMAGE_RATE/" ${GAME_PATH}/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini
fi
if [[ ! -z ${COLLECTION_DROP_RATE+x} ]]; then
echo "> Setting CollectionDropRate to $COLLECTION_DROP_RATE"
sed -E -i "s/CollectionDropRate=[+-]?([0-9]*[.])?[0-9]+/CollectionDropRate=$COLLECTION_DROP_RATE/" ${GAME_PATH}/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini
Expand Down Expand Up @@ -392,11 +388,13 @@ function startMain() {
}

term_handler() {
rconcli 'broadcast Server_Shutdown_requested'
rconcli 'broadcast Saving...'
rconcli 'save'
rconcli 'broadcast Done...'
sleep 3
if [[ ! -z ${RCON_ENABLED+x} ]]; then
rconcli 'broadcast Server_Shutdown_requested'
rconcli 'broadcast Saving...'
rconcli 'save'
rconcli 'broadcast Done...'
sleep 3
fi
kill -SIGTERM $(pidof PalServer-Linux-Test)
tail --pid=$(pidof PalServer-Linux-Test) -f 2>/dev/null
exit 143;
Expand Down

0 comments on commit 79be23a

Please sign in to comment.