be explicit with script type

This commit is contained in:
2022-07-04 13:08:32 -04:00
parent 1be8462b47
commit e95de8aa4a
2 changed files with 9 additions and 7 deletions

21
remote/pfhup.sh Executable file
View File

@@ -0,0 +1,21 @@
#!/bin/ksh
# install to /usr/local/bin on firewall
# OpenBSD pdksh
if [ "$(id -u)" -ne 0 ]; then
printf 'Needs to be run only from the ssl-update service.\n' >&2
exit 1
fi
if [ -z "$ssl_service" ]; then
printf 'Needs to be run only from the ssl-update service.\n' >&2
exit 1
fi
/sbin/pfctl -n -f /etc/pf.conf
if [ $? != 0 ]; then
printf 'Will not restart with a config error.\n' >&2
exit 1
fi
/sbin/pfctl -d
/sbin/pfctl -e -f /etc/pf.conf