diff --git a/btrbk-cron b/btrbk-cron index 5153781..fe8d014 100755 --- a/btrbk-cron +++ b/btrbk-cron @@ -5,6 +5,12 @@ LOCKFILE=/run/btrbk/btrbk.lock LOGFILE=$(mktemp) trap 'rm -f -- "${LOGFILE}"' EXIT +# check for superpowers +if [[ "${EUID}" -ne 0 ]] ; then + echo "Please run me as root" + exit 1 +fi + echo "---" | tee -a "${LOGFILE}" echo "Start btrbk-cron: $(date||true)" | tee -a "${LOGFILE}"