From 029cddf945767c8bb382079bcc5dfb319b11c2de Mon Sep 17 00:00:00 2001 From: RandomNinjaAtk Date: Sun, 22 Mar 2020 19:51:35 -0400 Subject: [PATCH] Add files via upload --- root/etc/cont-init.d/35-sma-config-update.bash | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 root/etc/cont-init.d/35-sma-config-update.bash diff --git a/root/etc/cont-init.d/35-sma-config-update.bash b/root/etc/cont-init.d/35-sma-config-update.bash new file mode 100644 index 0000000..1a5519d --- /dev/null +++ b/root/etc/cont-init.d/35-sma-config-update.bash @@ -0,0 +1,17 @@ +#!/usr/bin/with-contenv bash + +# Check if config is already updated, if not start cron... +if [ ! -f "/config/config.xml" ]; then + # start cron + service cron start + exit 0 +fi + +if [ -f "/config/config.xml" ]; then + # update autoprocess + python3 /scripts/update.py + # stop cron + service cron status > /dev/null && service cron stop +fi + +exit $?