You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
39 lines
1011 B
39 lines
1011 B
2 years ago
|
#!/usr/bin/with-contenv bash
|
||
|
|
||
|
# create scripts directory if missing
|
||
|
if [ ! -d "/config/lidarr-extended/scripts" ]; then
|
||
|
mkdir -p "/config/lidarr-extended/scripts"
|
||
|
else
|
||
|
echo "Updating scripts..."
|
||
|
rm -rf /config/lidarr-extended/scripts/*
|
||
|
fi
|
||
|
|
||
|
if [ -d "/config/lidarr-extended/scripts" ]; then
|
||
|
cp -r /scripts/* /config/lidarr-extended/scripts/
|
||
|
fi
|
||
|
|
||
|
# create cache directory if missing
|
||
|
if [ ! -d "/config/lidarr-extended/cache" ]; then
|
||
|
mkdir -p "/config/lidarr-extended/cache"
|
||
|
fi
|
||
|
|
||
|
# create logs directory if missing
|
||
|
if [ ! -d "/config/lidarr-extended/logs" ]; then
|
||
|
mkdir -p "/config/lidarr-extended/logs"
|
||
|
fi
|
||
|
|
||
|
|
||
|
# set permissions
|
||
|
chmod 777 "/config/lidarr-extended"
|
||
|
chmod 777 "/config/lidarr-extended/scripts"
|
||
|
chmod 777 "/config/lidarr-extended/cache"
|
||
|
chmod 777 "/config/lidarr-extended/logs"
|
||
|
chown -R abc:abc "/config/lidarr-extended"
|
||
|
chown -R abc:abc "/config/lidarr-extended/cache"
|
||
|
chown -R abc:abc "/config/lidarr-extended/scripts"
|
||
|
chown -R abc:abc "/config/lidarr-extended/logs"
|
||
|
|
||
|
echo "Complete..."
|
||
|
|
||
|
exit $?
|