From d8d6ab6d08ae8a24b0a267d993919e0904851fad Mon Sep 17 00:00:00 2001 From: RandomNinjaAtk Date: Mon, 16 Mar 2020 16:48:44 -0400 Subject: [PATCH] Create 82-sma-update.bash --- root/etc/cont-init.d/82-sma-update.bash | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 root/etc/cont-init.d/82-sma-update.bash diff --git a/root/etc/cont-init.d/82-sma-update.bash b/root/etc/cont-init.d/82-sma-update.bash new file mode 100644 index 0000000..2770d27 --- /dev/null +++ b/root/etc/cont-init.d/82-sma-update.bash @@ -0,0 +1,16 @@ +#!/usr/bin/with-contenv bash + +# update from git +if [[ "${SMA_UPDATE}" == "true" ]] +then + git -C ${SMA_PATH} pull origin master +fi + +# permissions +chown -R abc:abc ${SMA_PATH} +chmod -R 775 ${SMA_PATH}/*.sh + +# update autoprocess +python3 ${SMA_PATH}/update.py + +exit $?