+ created alias scripts for lgsm commands
This commit is contained in:
parent
ea794820ec
commit
1819fac32e
@ -81,4 +81,21 @@ RUN chown "$DOCKER_USER:$DOCKER_USER" /home/prepareServer.sh && \
|
|||||||
chmod a=rx /home/prepareServer.sh && \
|
chmod a=rx /home/prepareServer.sh && \
|
||||||
chmod a=rx /home/initConfig.sh && \
|
chmod a=rx /home/initConfig.sh && \
|
||||||
chmod a=rx /home/forceWorkshopDownload.sh && \
|
chmod a=rx /home/forceWorkshopDownload.sh && \
|
||||||
chmod a=rx /home/installAndMountAddons.sh
|
chmod a=rx /home/installAndMountAddons.sh && \
|
||||||
|
\
|
||||||
|
/home/createAlias.sh "details" '/home/steam/gmodserver details' && \
|
||||||
|
/home/createAlias.sh "backup" '/home/steam/gmodserver backup' && \
|
||||||
|
/home/createAlias.sh "console" '/home/steam/gmodserver console' && \
|
||||||
|
/home/createAlias.sh "debug" '/home/steam/gmodserver debug' && \
|
||||||
|
/home/createAlias.sh "details" '/home/steam/gmodserver details' && \
|
||||||
|
/home/createAlias.sh "force-update" '/home/steam/gmodserver force-update' && \
|
||||||
|
/home/createAlias.sh "install" '/home/steam/gmodserver install' && \
|
||||||
|
/home/createAlias.sh "monitor" '/home/steam/gmodserver monitor' && \
|
||||||
|
/home/createAlias.sh "postdetails" '/home/steam/gmodserver postdetails' && \
|
||||||
|
/home/createAlias.sh "restart" '/home/steam/gmodserver restart' && \
|
||||||
|
/home/createAlias.sh "start" '/home/steam/gmodserver start' && \
|
||||||
|
/home/createAlias.sh "stop" '/home/steam/gmodserver stop' && \
|
||||||
|
/home/createAlias.sh "test-alert" '/home/steam/gmodserver test-alert' && \
|
||||||
|
/home/createAlias.sh "update" '/home/steam/gmodserver update' && \
|
||||||
|
/home/createAlias.sh "update-lgsm" '/home/steam/gmodserver update-lgsm' && \
|
||||||
|
/home/createAlias.sh "validate" '/home/steam/gmodserver validate'
|
||||||
|
@ -34,7 +34,7 @@ ENTRYPOINT ["./home/entrypoint.sh"]
|
|||||||
|
|
||||||
#WORKDIR "$STEAM_PATH"
|
#WORKDIR "$STEAM_PATH"
|
||||||
|
|
||||||
COPY ["entrypoint.sh", "initCron.sh", "/home/"]
|
COPY ["entrypoint.sh", "initCron.sh", "createAlias.sh", "/home/"]
|
||||||
|
|
||||||
# procps needed for ps command
|
# procps needed for ps command
|
||||||
# iproute2 needed because of "-slim"
|
# iproute2 needed because of "-slim"
|
||||||
@ -52,6 +52,7 @@ RUN dpkg --add-architecture i386 && \
|
|||||||
chown -R "$DOCKER_USER:$DOCKER_USER" "$STEAM_PATH" && \
|
chown -R "$DOCKER_USER:$DOCKER_USER" "$STEAM_PATH" && \
|
||||||
chmod a=rx /home/entrypoint.sh && \
|
chmod a=rx /home/entrypoint.sh && \
|
||||||
chmod a=rx /home/initCron.sh && \
|
chmod a=rx /home/initCron.sh && \
|
||||||
|
chmod a=rx /home/createAlias.sh && \
|
||||||
\
|
\
|
||||||
ulimit -n 2048 && \
|
ulimit -n 2048 && \
|
||||||
\
|
\
|
||||||
|
22
lgsm/createAlias.sh
Normal file
22
lgsm/createAlias.sh
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
if [ "${DEBUGGING}" = "true" ]; then
|
||||||
|
set -o xtrace
|
||||||
|
fi
|
||||||
|
|
||||||
|
set -o errexit
|
||||||
|
set -o nounset
|
||||||
|
|
||||||
|
name=$1
|
||||||
|
command=$2
|
||||||
|
file="/usr/local/bin/$name"
|
||||||
|
|
||||||
|
echo "[createAlias.sh] $name = $command"
|
||||||
|
|
||||||
|
if [ -f "$file" ]; then
|
||||||
|
echo "[createAlias.sh]error file already exists => cant create alias with this method"
|
||||||
|
else
|
||||||
|
echo '#!/bin/bash' > "$file"
|
||||||
|
echo "$command" >> "$file" && \
|
||||||
|
chmod a=rx "$file"
|
||||||
|
fi
|
Loading…
Reference in New Issue
Block a user