+ created alias scripts for lgsm commands
This commit is contained in:
@ -34,7 +34,7 @@ ENTRYPOINT ["./home/entrypoint.sh"]
|
||||
|
||||
#WORKDIR "$STEAM_PATH"
|
||||
|
||||
COPY ["entrypoint.sh", "initCron.sh", "/home/"]
|
||||
COPY ["entrypoint.sh", "initCron.sh", "createAlias.sh", "/home/"]
|
||||
|
||||
# procps needed for ps command
|
||||
# iproute2 needed because of "-slim"
|
||||
@ -52,6 +52,7 @@ RUN dpkg --add-architecture i386 && \
|
||||
chown -R "$DOCKER_USER:$DOCKER_USER" "$STEAM_PATH" && \
|
||||
chmod a=rx /home/entrypoint.sh && \
|
||||
chmod a=rx /home/initCron.sh && \
|
||||
chmod a=rx /home/createAlias.sh && \
|
||||
\
|
||||
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
|
Reference in New Issue
Block a user