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
1.0 KiB
39 lines
1.0 KiB
5 years ago
|
#!/usr/bin/with-contenv bash
|
||
|
|
||
|
# import new config, if does not exist
|
||
5 years ago
|
if [ ! -f "/config/scripts/autoProcess.ini" ]; then
|
||
5 years ago
|
cp "/usr/local/sma/setup/autoProcess.ini.sample" "/config/scripts/autoProcess.ini"
|
||
|
# set permissions
|
||
|
chmod 0666 "/config/scripts/autoProcess.ini"
|
||
5 years ago
|
fi
|
||
|
|
||
|
# link config file for use
|
||
|
if [ ! -f "/usr/local/sma/scripts/config/autoProcess.ini" ]; then
|
||
5 years ago
|
ln -s "/config/scripts/autoProcess.ini" "/usr/local/sma/config/autoProcess.ini"
|
||
5 years ago
|
fi
|
||
|
|
||
|
# remove sickbeard_mp4_automator log if exists
|
||
|
if [ -f "/var/log/sma.log" ]; then
|
||
|
rm "/var/log/sma.log"
|
||
|
fi
|
||
|
|
||
|
# remove sickbeard_mp4_automator log from sma config folder if exists
|
||
|
if [ -f "/config/sma/sma.log" ]; then
|
||
|
rm "/config/sma/sma.log"
|
||
|
fi
|
||
|
|
||
|
# create sma log file
|
||
5 years ago
|
touch "/config/scripts/sma.log" && \
|
||
5 years ago
|
|
||
|
# set permissions
|
||
5 years ago
|
chmod 0666 "/config/scripts/sma.log" && \
|
||
5 years ago
|
|
||
5 years ago
|
# link sma log file
|
||
5 years ago
|
ln -s "/config/scripts/sma.log" "/var/log/sma.log" && \
|
||
5 years ago
|
|
||
5 years ago
|
# Set ffmpeg/ffprobe location
|
||
5 years ago
|
sed -i "s/ffmpeg.exe/ffmpeg/g" "/config/scripts/autoProcess.ini"
|
||
|
sed -i "s/ffprobe.exe/ffprobe/g" "/config/scripts/autoProcess.ini"
|
||
5 years ago
|
|
||
5 years ago
|
exit 0
|