check EUID instead of whoami for root

This commit is contained in:
2026-08-22 06:21:31 +02:00
parent 22abaf6431
commit 9722741bfd
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -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"