|
|
@ -1,36 +1,36 @@
|
|
|
|
#!/usr/bin/with-contenv bash
|
|
|
|
#!/usr/bin/with-contenv bash
|
|
|
|
|
|
|
|
|
|
|
|
# create scripts directory if missing
|
|
|
|
# create scripts directory if missing
|
|
|
|
if [ ! -d "/config/lidarr-extended/scripts" ]; then
|
|
|
|
if [ ! -d "/config/extended/scripts" ]; then
|
|
|
|
mkdir -p "/config/lidarr-extended/scripts"
|
|
|
|
mkdir -p "/config/extended/scripts"
|
|
|
|
else
|
|
|
|
else
|
|
|
|
echo "Updating scripts..."
|
|
|
|
echo "Updating scripts..."
|
|
|
|
rm -rf /config/lidarr-extended/scripts/*
|
|
|
|
rm -rf /config/extended/scripts/*
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
if [ -d "/config/lidarr-extended/scripts" ]; then
|
|
|
|
if [ -d "/config/lidarr-extended/scripts" ]; then
|
|
|
|
cp -r /scripts/* /config/lidarr-extended/scripts/
|
|
|
|
cp -r /scripts/* /config/extended/scripts/
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
# create cache directory if missing
|
|
|
|
# create cache directory if missing
|
|
|
|
if [ ! -d "/config/lidarr-extended/cache" ]; then
|
|
|
|
if [ ! -d "/config/extended/cache" ]; then
|
|
|
|
mkdir -p "/config/lidarr-extended/cache"
|
|
|
|
mkdir -p "/config/extended/cache"
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
# create logs directory if missing
|
|
|
|
# create logs directory if missing
|
|
|
|
if [ ! -d "/config/lidarr-extended/logs" ]; then
|
|
|
|
if [ ! -d "/config/extended/logs" ]; then
|
|
|
|
mkdir -p "/config/lidarr-extended/logs"
|
|
|
|
mkdir -p "/config/extended/logs"
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# set permissions
|
|
|
|
# set permissions
|
|
|
|
chmod 777 /config/lidarr-extended
|
|
|
|
chmod 777 /config/extended
|
|
|
|
chmod 777 /config/lidarr-extended/cache
|
|
|
|
chmod 777 /config/extended/cache
|
|
|
|
chmod 777 /config/lidarr-extended/logs
|
|
|
|
chmod 777 /config/extended/logs
|
|
|
|
chmod 666 /config/lidarr-extended/cache/*
|
|
|
|
chmod 666 /config/extended/cache/*
|
|
|
|
chmod 666 /config/lidarr-extended/logs/*
|
|
|
|
chmod 666 /config/extended/logs/*
|
|
|
|
chmod -R 777 /config/lidarr-extended/scripts
|
|
|
|
chmod -R 777 /config/extended/scripts
|
|
|
|
chown -R abc:abc /config/lidarr-extended
|
|
|
|
chown -R abc:abc /config/extended
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
echo "Complete..."
|
|
|
|
echo "Complete..."
|
|
|
|