Don't do sudo

This commit is contained in:
Martin Lablans
2022-01-10 15:31:07 +01:00
parent 75b33690f6
commit 123ce65c82
2 changed files with 27 additions and 10 deletions

12
lib/functions.sh Executable file
View File

@ -0,0 +1,12 @@
#!/bin/bash -e
exitIfNotRoot() {
if [ "$EUID" -ne 0 ]; then
echo "Please run as root"
exit 1
fi
}
log() {
echo "$(date +'%Y-%m-%d %T')" "$1:" "$2"
}