22 lines
369 B
Bash
Executable file
22 lines
369 B
Bash
Executable file
#!/bin/sh
|
|
set -e
|
|
|
|
##
|
|
# variables
|
|
localbase=${LOCALBASE:-$(realpath "$(dirname "$0")"/..)}
|
|
libexec="${localbase}"/libexec/portzap
|
|
|
|
##
|
|
# functions
|
|
# shellcheck source=/dev/null
|
|
. "${libexec}"/functions/print.sh
|
|
|
|
##
|
|
# main
|
|
if [ "$(id -u)" = "0" ]; then
|
|
"${libexec}"/setup/setup-user
|
|
"${libexec}"/setup/setup-doas
|
|
else
|
|
printerr "you must be root"
|
|
exit 1
|
|
fi
|