SHA256
check EUID instead of whoami for root
This commit is contained in:
+1
-1
@@ -1,6 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
[ "$(whoami)" != "root" ] && echo "Error: installation only works as root!" >&2 && exit 1
|
||||
(( EUID != 0 )) && echo "Error: installation only works as root!" >&2 && exit 1
|
||||
|
||||
API_ENDPOINT="https://git.ccc-rheintal.ch/api/v1/repos/spacefreak/pbc"
|
||||
|
||||
|
||||
@@ -394,7 +394,7 @@ case "$action" in
|
||||
install)
|
||||
update=${args[0]:-false}
|
||||
|
||||
[ "$(whoami)" != "root" ] && echo "Error: installation only works as root!" >&2 && exit 1
|
||||
(( EUID != 0 )) && echo "Error: installation only works as root!" >&2 && exit 1
|
||||
|
||||
install_proxmox_backup_client "$update" || exit $?
|
||||
|
||||
|
||||
Reference in New Issue
Block a user