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.
52 lines
1.4 KiB
52 lines
1.4 KiB
#!/usr/bin/with-contenv bash
|
|
|
|
# create extended directory if missing
|
|
if [ ! -d "/config/extended" ]; then
|
|
mkdir -p "/config/extended"
|
|
fi
|
|
|
|
# create scripts directory if missing
|
|
if [ ! -d "/config/extended/scripts" ]; then
|
|
mkdir -p "/config/extended/scripts"
|
|
else
|
|
echo "Removing previous scripts..."
|
|
rm -rf /config/extended/scripts/*
|
|
fi
|
|
|
|
if [ -d "/config/extended/scripts" ]; then
|
|
echo "Importing extended scripts..."
|
|
cp -r /scripts/* /config/extended/scripts/
|
|
fi
|
|
|
|
# create cache directory if missing
|
|
if [ ! -d "/config/extended/cache" ]; then
|
|
mkdir -p "/config/extended/cache"
|
|
fi
|
|
|
|
# create logs directory if missing
|
|
if [ ! -d "/config/extended/logs" ]; then
|
|
mkdir -p "/config/extended/logs"
|
|
fi
|
|
|
|
# create configs directory if missing
|
|
if [ ! -d "/config/extended/configs" ]; then
|
|
mkdir -p "/config/extended/configs"
|
|
fi
|
|
|
|
if [ ! -f "/config/extended/configs/sma.ini" ]; then
|
|
cp /sma.ini "/config/extended/configs/sma.ini"
|
|
fi
|
|
|
|
# set permissions
|
|
chmod 777 -R /usr/local/sma
|
|
find /config/extended -type d -exec chmod 777 {} \;
|
|
find /config/extended -type f -exec chmod 666 {} \;
|
|
chmod -R 777 /config/extended/scripts
|
|
|
|
echo "Setting up scripts..."
|
|
echo "Downloading and setting up QueueCleaner.bash"
|
|
curl "https://raw.githubusercontent.com/RandomNinjaAtk/arr-scripts/main/QueueCleaner.bash" -o "/etc/services.d/QueueCleaner.bash"
|
|
chmod 777 "/etc/services.d/QueueCleaner.bash"
|
|
echo "Complete..."
|
|
exit
|