„scripts/start.sh“ ändern
This commit is contained in:
@@ -16,5 +16,21 @@ else
|
||||
fi
|
||||
|
||||
echo "---Starting...---"
|
||||
chown -R ${UID}:${GID} /opt/scripts
|
||||
su ${USER} -c "/opt/scripts/start-server.sh"
|
||||
chown -R root:${GID} /opt/scripts
|
||||
chmod -R 750 /opt/scripts
|
||||
chown -R ${UID}:${GID} ${DATA_DIR}
|
||||
|
||||
term_handler() {
|
||||
kill -SIGTERM "$killpid"
|
||||
wait "$killpid" -f 2>/dev/null
|
||||
exit 143;
|
||||
}
|
||||
|
||||
trap 'kill ${!}; term_handler' SIGTERM
|
||||
su ${USER} -c "/opt/scripts/start-server.sh" &
|
||||
killpid="$!"
|
||||
while true
|
||||
do
|
||||
wait $killpid
|
||||
exit 0;
|
||||
done
|
Reference in New Issue
Block a user