diff --git a/store/refresh_store.sh b/store/refresh_store.sh new file mode 100644 index 00000000..f849692c --- /dev/null +++ b/store/refresh_store.sh @@ -0,0 +1,15 @@ +#!/usr/bin/env bash + +workdir=$(realpath "$(dirname "$0")") +log=$workdir/refresh_store.log + +cd "$workdir" +date >> "$log" +git pull &>/dev/null +cat cron | sed "s@__BASEDIR__@$workdir@g" > /etc/cron.d/refresh_store + +systemctl restart appstore.service 2>&1 | tee "$log" + +if systemctl --quiet is-failed appstore.service; then + sendxmpppy "[refresh_store] Restarting appstore.service failed miserably :scream:" +fi