diff --git a/install.sh b/install.sh index 49feb26..9040e65 100755 --- a/install.sh +++ b/install.sh @@ -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" diff --git a/pbc b/pbc index f1ab402..2f0ede3 100755 --- a/pbc +++ b/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 $?