rename user to cronicle

This commit is contained in:
2023-05-27 18:46:23 +00:00
parent b932a8d2f1
commit 1089abc2cb
4 changed files with 10 additions and 13 deletions

View File

@ -28,11 +28,11 @@ MODE=${MODE}
if [[ ! "${PUID}" -eq 0 ]] && [[ ! "${PGID}" -eq 0 ]]; then
echo "Executing usermod..."
mkdir "/tmp/temphome"
usermod -d "/tmp/temphome" mrmeeb
usermod -o -u "${PUID}" mrmeeb
usermod -d /config mrmeeb
usermod -d "/tmp/temphome" cronicle
usermod -o -u "${PUID}" cronicle
usermod -d /config cronicle
rm -rf "/tmp/temphome"
groupmod -o -g "${PGID}" mrmeeb
groupmod -o -g "${PGID}" cronicle
else
echo "Running as root is not supported, please fix your PUID and PGID!"
exit 1
@ -43,11 +43,11 @@ echo "Checking permissions in /config and /app (this can take some time)."
if [ ! "$(stat -c %u /app)" -eq "${PUID}" ] || [ ! "$(stat -c %g /app)" -eq "${PGID}" ]
then
echo "Fixing permissions for /app."
chown -R mrmeeb:mrmeeb /app
chown -R cronicle:cronicle /app
fi
if [ ! "$(stat -c %u /config)" -eq "${PUID}" ] || [ ! "$(stat -c %g /config)" -eq "${PGID}" ]
then
echo "Fixing permissions for /config."
chown -R mrmeeb:mrmeeb /config
chown -R cronicle:cronicle /config
fi

View File

@ -1 +1 @@
exec s6-setuidgid mrmeeb /cronicle-prepare.sh
exec s6-setuidgid cronicle /cronicle-prepare.sh

View File

@ -1,3 +1,3 @@
#!/command/with-contenv bash
# shellcheck shell=bash
exec s6-setuidgid mrmeeb node /app/cronicle/lib/main.js --color 1
exec s6-setuidgid cronicle node /app/cronicle/lib/main.js --color 1