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

View File

@@ -29,14 +29,14 @@ printf 'Firewall config: "%s"\n' "$fw_config"
if [ "$state" == 'HTTP_UP' ]; then
printf 'Removing comment\n'
sed -i 's/^# pass/pass/' "$fw_config"
/usr/bin/sed -i 's/^# pass/pass/' "$fw_config"
if [ $? != 0 ]; then
printf 'Failed to configure %s http port up.\n' "$ssl_service" >&2
exit 1
fi
elif [ "$state" == 'HTTP_DOWN' ]; then
printf 'Adding comment\n'
sed -i 's/^pass/# pass/' "$fw_config"
/usr/bin/sed -i 's/^pass/# pass/' "$fw_config"
if [ $? != 0 ]; then
printf 'Failed to configure %s http port down.\n' "$ssl_service" >&2
exit 1
@@ -46,7 +46,7 @@ else
exit 1
fi
/usr/local/bin/pfhup
/usr/local/bin/pfhup.sh
if [ $? != 0 ]; then
printf 'Failed to restart firewall. Check config immediately.\n' >&2
exit 1