„scripts/start.sh“ ändern
This commit is contained in:
@@ -17,5 +17,22 @@ fi
|
||||
|
||||
echo "---Starting...---"
|
||||
chown -R ${UID}:${GID} /opt/scripts
|
||||
chown -R ${UID}:${GID} ${DATA_DIR}
|
||||
su ${USER} -c "/opt/scripts/start-server.sh"
|
||||
|
||||
term_handler() {
|
||||
kill -SIGTERM "$killpid"
|
||||
wait "$killpid" -f 2>/dev/null
|
||||
exit 143;
|
||||
}
|
||||
|
||||
trap 'kill ${!}; term_handler' SIGTERM
|
||||
if [ "${SAVE_LOG}" == "true" ]; then
|
||||
/opt/scripts/start-server.sh 2>&1 | tee ${DATA_DIR}/"$(date +'%Y-%m-%d_%H.%M.%S')".log &
|
||||
else
|
||||
/opt/scripts/start-server.sh &
|
||||
fi
|
||||
killpid="$!"
|
||||
while true
|
||||
do
|
||||
wait $killpid
|
||||
exit 0;
|
||||
done
|
Reference in New Issue
Block a user