yolo refresh_store.sh
This commit is contained in:
parent
e3cf837d70
commit
2c1cbe133f
15
store/refresh_store.sh
Normal file
15
store/refresh_store.sh
Normal file
@ -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
|
Loading…
Reference in New Issue
Block a user