From 20ffa34ff1eb75cea086695f61d35bb31cffbf8b Mon Sep 17 00:00:00 2001 From: RandomNinjaAtk Date: Sat, 25 Apr 2020 10:03:10 -0400 Subject: [PATCH] Update to new config file name to support multiple configs for advanced users... --- root/etc/cont-init.d/32-sma-setup.bash | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/root/etc/cont-init.d/32-sma-setup.bash b/root/etc/cont-init.d/32-sma-setup.bash index 2bc8f6c..fb7d0a2 100644 --- a/root/etc/cont-init.d/32-sma-setup.bash +++ b/root/etc/cont-init.d/32-sma-setup.bash @@ -23,9 +23,14 @@ if [ ! -d "/config/scripts/configs" ]; then chmod 0777 -R "/config/scripts/configs" fi +# Update name of legacy file naming +if [ -f "/config/scripts/configs/autoProcess.ini" ]; then + mv "/config/scripts/configs/autoProcess.ini" "/config/scripts/configs/video-pp-sma.ini" +fi + # import new config, if does not exist -if [ ! -f "/config/scripts/configs/autoProcess.ini" ]; then - cp "/usr/local/sma/setup/autoProcess.ini.sample" "/config/scripts/configs/autoProcess.ini" && \ +if [ ! -f "/config/scripts/configs/video-pp-sma.ini" ]; then + cp "/usr/local/sma/setup/autoProcess.ini.sample" "/config/scripts/configs/video-pp-sma.ini" && \ python3 /scripts/update.py fi @@ -34,11 +39,10 @@ touch "/config/scripts/logs/sma.log" && \ # link sma files ln -s "/config/scripts/logs/sma.log" "/usr/local/sma/config/sma.log" && \ -ln -s "/config/scripts/configs/autoProcess.ini" "/usr/local/sma/config/autoProcess.ini" && \ # set permissions -chmod 0666 "/config/scripts/logs"/* chmod 0777 -R "/usr/local/sma" chmod 0777 -R "/scripts" +chmod 0777 -R "/config/scripts" exit 0