portzap/bin/setup-portzap

23 lines
369 B
Text
Raw Normal View History

#!/bin/sh
set -e
##
# variables
2024-05-23 05:41:21 +02:00
localbase=${LOCALBASE:-$(realpath "$(dirname "$0")"/..)}
2024-05-23 03:37:34 +02:00
libexec="${localbase}"/libexec/portzap
2024-05-23 02:42:15 +02:00
##
# functions
# shellcheck source=/dev/null
. "${libexec}"/functions/print.sh
2024-05-23 02:42:15 +02:00
##
# main
2024-07-22 02:59:36 +02:00
if [ "$(id -u)" = "0" ]; then
2024-07-26 15:54:28 +02:00
"${libexec}"/setup/setup-user
2024-07-22 02:59:36 +02:00
"${libexec}"/setup/setup-doas
else
2024-05-23 02:42:15 +02:00
printerr "you must be root"
exit 1
fi