add monitoring scripts
This commit is contained in:
parent
c51e72686e
commit
8c603d6ebd
5 changed files with 87 additions and 0 deletions
18
monitor.sh.j2
Normal file
18
monitor.sh.j2
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
#!/bin/bash
|
||||
read -r command
|
||||
case $command in
|
||||
main)
|
||||
systemctl is-active --user backup-manager.timer
|
||||
;;
|
||||
lastrun)
|
||||
cat {{ homedir }}/.backupmanager.errors
|
||||
;;
|
||||
lastrunrecent)
|
||||
[ -f {{ homedir }}/.backupmanager.errors ] && [ $(find {{ homedir }}/.backupmanager.errors -mtime -2) ] && echo "OK" || echo "outdated"
|
||||
;;
|
||||
*)
|
||||
echo "Parameter unknown"
|
||||
;;
|
||||
esac
|
||||
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue