diff --git a/Shorewall-core/configure b/Shorewall-core/configure index 6aecc88a8..d72338a36 100755 --- a/Shorewall-core/configure +++ b/Shorewall-core/configure @@ -91,6 +91,8 @@ for p in $@; do fi done +cd $(dirname $0) + vendor=${params[HOST]} if [ -z "$vendor" ]; then diff --git a/Shorewall-init/install.sh b/Shorewall-init/install.sh index ee96b8a0b..c49a2a9b4 100755 --- a/Shorewall-init/install.sh +++ b/Shorewall-init/install.sh @@ -490,7 +490,11 @@ esac if [ -z "$DESTDIR" ]; then if [ $configure -eq 1 -a -n "$first_install" ]; then if [ $HOST = debian ]; then - if mywhich insserv; then + if [ -n "$SERVICEDIR" ]; then + if systemctl enable ${PRODUCT}.service; then + echo "Shorewall INit will start automatically at boot" + fi + elif mywhich insserv; then if insserv ${INITDIR}/shorewall-init; then echo "Shorewall Init will start automatically at boot" else diff --git a/Shorewall-lite/uninstall.sh b/Shorewall-lite/uninstall.sh index f2c3d8472..245c9b008 100755 --- a/Shorewall-lite/uninstall.sh +++ b/Shorewall-lite/uninstall.sh @@ -195,9 +195,11 @@ if [ -f "$FIREWALL" ]; then remove_file $FIREWALL fi -if [ -n "$SYSTEMD" ]; then +[ -z "$SERVICEDIR" ] && SERVICEDIR="$SYSTEMD" + +if [ -n "$SERVICEDIR" ]; then [ $configure -eq 1 ] && systemctl disable ${PRODUCT} - rm -f $SYSTEMD/shorewall-lite.service + rm -f $SERVICEDIR/shorewall-lite.service fi rm -f ${SBINDIR}/shorewall-lite diff --git a/Shorewall6-lite/uninstall.sh b/Shorewall6-lite/uninstall.sh index 6a73f7e56..309ca4ccd 100755 --- a/Shorewall6-lite/uninstall.sh +++ b/Shorewall6-lite/uninstall.sh @@ -193,9 +193,11 @@ if [ -f "$FIREWALL" ]; then remove_file $FIREWALL fi -if [ -n "$SYSTEMD" ]; then +[ -z "$SERVICEDIR" ] && SERVICEDIR="$SYSTEMD" + +if [ -n "$SERVICEDIR" ]; then [ $configure -eq 1 ] && systemctl disable ${PRODUCT} - rm -f $SYSTEMD/shorewall6-lite.service + rm -f $SERVICEDIR/shorewall6-lite.service fi rm -f ${SBINDIR}/shorewall6-lite @@ -205,7 +207,6 @@ rm -rf ${SHAREDIR}/shorewall6-lite rm -rf ${LIBEXECDIR}/shorewall6-lite rm -f ${CONFDIR}/logrotate.d/shorewall6-lite rm -f ${SYSCONFDIR}/shorewall6-lite -[ -n "$SYSTEMD" ] && rm -f ${SYSTEMD}/shorewall6-lite.service rm -f ${MANDIR}/man5/shorewall6-lite* rm -f ${MANDIR}/man8/shorewall6-lite*