From 2b9752e8b64e8e3a556e0b2fc78f122578a5c9e1 Mon Sep 17 00:00:00 2001 From: Colin Guthrie Date: Wed, 25 Feb 2015 10:56:07 +0000 Subject: Replace init script with systemd unit (mga#14401) --- NEWS | 2 ++ scripts/mandi.init | 53 --------------------------------------------------- scripts/mandi.service | 9 +++++++++ 3 files changed, 11 insertions(+), 53 deletions(-) delete mode 100644 scripts/mandi.init create mode 100644 scripts/mandi.service diff --git a/NEWS b/NEWS index bcaab57..4ec9baa 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,5 @@ +- replace init script with systemd unit (mga#14401) + 1.3 - replace obsolete state module with conntrack (mga#8225) diff --git a/scripts/mandi.init b/scripts/mandi.init deleted file mode 100644 index 29c8b2c..0000000 --- a/scripts/mandi.init +++ /dev/null @@ -1,53 +0,0 @@ -#!/bin/sh -# -# Startup script for the mandi daemon (oblin@mandriva.com) -# -# chkconfig: 2345 26 59 -# -# description: Network monitoring daemon (Interactive Firewall and wireless) -# -### BEGIN INIT INFO -# Provides: mandi -# Should-Start: shorewall -# Required-Start: messagebus -# Required-Stop: messagebus -# Default-Start: 2 3 4 5 -# Short-Description: Network monitoring daemon -# Description: Network monitoring daemon (Interactive Firewall and wireless) -### END INIT INFO - -. /etc/init.d/functions - -case "$1" in - start) - gprintf "Starting mandi daemon: " - daemon /usr/sbin/mandi -d - RETVAL=$? - echo - [ $RETVAL -eq 0 ] && touch /var/lock/subsys/mandi - ;; - stop) - gprintf "Shutting down mandi daemon: " - killproc mandi - RETVAL=$? - echo - [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/mandi - ;; - status) - status mandi - RETVAL=$? - ;; - restart|reload) - $0 stop - $0 start - ;; - condrestart) - [ -f /var/lock/subsys/mandi ] && restart || : - ;; - *) - gprintf "Usage: %s {start|stop|status|restart}\n" "$0" - RETVAL=1 - ;; -esac - -exit $RETVAL diff --git a/scripts/mandi.service b/scripts/mandi.service new file mode 100644 index 0000000..9547f54 --- /dev/null +++ b/scripts/mandi.service @@ -0,0 +1,9 @@ +[Unit] +Description=Network monitoring daemon (Interactive Firewall and wireless) +After=shorewall.service shorewall6.service + +[Service] +ExecStart=/usr/sbin/mandi + +[Install] +WantedBy=multi-user.target -- cgit v1.2.1