Allow running bastille and subcomands with help flags as regular user

This commit is contained in:
Lars Engels
2023-03-16 20:58:11 +01:00
parent 6776427e5a
commit 64c3b6045e
33 changed files with 74 additions and 14 deletions

View File

@@ -32,17 +32,6 @@ PATH=${PATH}:/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin
. /usr/local/share/bastille/common.sh
## root check first.
bastille_root_check() {
if [ "$(id -u)" -ne 0 ]; then
## permission denied
error_notify "Bastille: Permission Denied"
error_exit "root / sudo / doas required"
fi
}
bastille_root_check
## check for config existance
bastille_conf_check() {
if [ ! -r "/usr/local/etc/bastille/bastille.conf" ]; then