„scripts/start.sh“ ändern
This commit is contained in:
@@ -8,7 +8,7 @@ umask ${UMASK}
|
||||
|
||||
echo "---Checking for optional scripts---"
|
||||
if [ -f /opt/scripts/user.sh ]; then
|
||||
echo "---Found optional script, executing---"
|
||||
echo "---Found optional script, executing---"
|
||||
chmod +x /opt/scripts/user.sh
|
||||
/opt/scripts/user.sh
|
||||
else
|
||||
@@ -16,6 +16,7 @@ else
|
||||
fi
|
||||
|
||||
echo "---Starting...---"
|
||||
mkdir -p $DATA_DIR/".local/share/Arma 3" && mkdir -p $DATA_DIR/".local/share/Arma 3 - Other Profiles"
|
||||
chown -R ${UID}:${GID} /opt/scripts
|
||||
chown -R ${UID}:${GID} ${DATA_DIR}
|
||||
chown -R ${UID}:${GID} $DATA_DIR/.local
|
||||
@@ -25,4 +26,18 @@ chmod -R 770 $DATA_DIR/".local/share/Arma 3"
|
||||
chmod -R 770 $DATA_DIR/".local/share/Arma 3 - Other Profiles"
|
||||
chmod -R 770 /var/lib/mysql
|
||||
chmod -R 770 /var/run/mysqld
|
||||
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
|
||||
su ${USER} -c "/opt/scripts/start-server.sh" &
|
||||
killpid="$!"
|
||||
while true
|
||||
do
|
||||
wait $killpid
|
||||
exit 0;
|
||||
done
|
Reference in New Issue
Block a user