Compare commits
5 Commits
f2a90445c0
...
44dbbdd396
Author | SHA1 | Date | |
---|---|---|---|
44dbbdd396 | |||
e99cb9c5dd | |||
242902aef6 | |||
28ec5906ac | |||
73ef869c30 |
@ -43,24 +43,26 @@ fi
|
|||||||
if [ -d /config/init ]; then
|
if [ -d /config/init ]; then
|
||||||
if [ "$(ls -A /config/init)" ]; then
|
if [ "$(ls -A /config/init)" ]; then
|
||||||
echo "Running additional startup scripts."
|
echo "Running additional startup scripts."
|
||||||
bash /config/init/*
|
for f in /config/init/*.sh; do
|
||||||
|
bash "$f"
|
||||||
|
done
|
||||||
else
|
else
|
||||||
echo "/config/init is empty - no additional startup scripts detected."
|
echo "/config/init is empty - no additional startup scripts detected."
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
echo "Directory /config/init not found. Creating."
|
echo "Directory /config/init not found. Creating."
|
||||||
mkdir /config/init
|
mkdir /config/init && chown -R cronicle:cronicle /config/init
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Checking permissions in /config and /app."
|
echo "Checking permissions in /config and /app."
|
||||||
|
|
||||||
if [ ! "$(stat -c %u /app)" -eq "${PUID}" ] || [ ! "$(stat -c %g /app)" -eq "${PGID}" ]
|
if [ -n "$(find /app \! -user ${PUID})" ] || [ -n "$(find /app \! -group ${PGID})" ]
|
||||||
then
|
then
|
||||||
echo "Fixing permissions for /app (this can take some time)."
|
echo "Fixing permissions for /app (this can take some time)."
|
||||||
chown -R cronicle:cronicle /app
|
chown -R cronicle:cronicle /app
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ ! "$(stat -c %u /config)" -eq "${PUID}" ] || [ ! "$(stat -c %g /config)" -eq "${PGID}" ]
|
if [ -n "$(find /config \! -user ${PUID})" ] || [ -n "$(find /config \! -group ${PGID})" ]
|
||||||
then
|
then
|
||||||
echo "Fixing permissions for /config (this can take some time)."
|
echo "Fixing permissions for /config (this can take some time)."
|
||||||
chown -R cronicle:cronicle /config
|
chown -R cronicle:cronicle /config
|
||||||
|
@ -80,10 +80,8 @@ then
|
|||||||
then
|
then
|
||||||
|
|
||||||
echo "No config found. Copy config.json from the manager server and place it in /config/cronicle/conf dir."
|
echo "No config found. Copy config.json from the manager server and place it in /config/cronicle/conf dir."
|
||||||
cp -r /app/cronicle/conf /config/cronicle/conf
|
cp -R /app/cronicle/conf /config/cronicle/conf
|
||||||
rm -rf /config/cronicle/conf/config.json
|
rm -rf /config/cronicle/conf/config.json
|
||||||
rm -rf /app/cronicle/conf
|
|
||||||
ln -s /config/cronicle/conf /app/cronicle/conf
|
|
||||||
echo ''
|
echo ''
|
||||||
echo ''
|
echo ''
|
||||||
echo '*************************************'
|
echo '*************************************'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user