„scripts/start.sh“ hinzufügen
This commit is contained in:
20
scripts/start.sh
Normal file
20
scripts/start.sh
Normal file
@@ -0,0 +1,20 @@
|
||||
#!/bin/bash
|
||||
echo "---Checking if UID: ${UID} matches user---"
|
||||
usermod -u ${UID} ${USER}
|
||||
echo "---Checking if GID: ${GID} matches user---"
|
||||
usermod -g ${GID} ${USER}
|
||||
echo "---Setting umask to ${UMASK}---"
|
||||
umask ${UMASK}
|
||||
|
||||
echo "---Checking for optional scripts---"
|
||||
if [ -f /opt/scripts/user.sh ]; then
|
||||
echo "---Found optional script, executing---"
|
||||
chmod +x /opt/scripts/user.sh
|
||||
/opt/scripts/user.sh
|
||||
else
|
||||
echo "---No optional script found, continuing---"
|
||||
fi
|
||||
|
||||
echo "---Starting...---"
|
||||
chown -R ${UID}:${GID} /opt/scripts
|
||||
su ${USER} -c "/opt/scripts/start-server.sh"
|
Reference in New Issue
Block a user