summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorColin Guthrie <colin@mageia.org>2015-02-25 10:56:07 +0000
committerColin Guthrie <colin@mageia.org>2015-02-25 11:04:41 +0000
commit2b9752e8b64e8e3a556e0b2fc78f122578a5c9e1 (patch)
tree54511098a659551e516191c0b23507659eac4e84 /scripts
parentd6136fa13e26e117fc1fe5ba89a9fec8f4816524 (diff)
downloadmandi-2b9752e8b64e8e3a556e0b2fc78f122578a5c9e1.tar
mandi-2b9752e8b64e8e3a556e0b2fc78f122578a5c9e1.tar.gz
mandi-2b9752e8b64e8e3a556e0b2fc78f122578a5c9e1.tar.bz2
mandi-2b9752e8b64e8e3a556e0b2fc78f122578a5c9e1.tar.xz
mandi-2b9752e8b64e8e3a556e0b2fc78f122578a5c9e1.zip
Replace init script with systemd unit (mga#14401)
Diffstat (limited to 'scripts')
-rw-r--r--scripts/mandi.init53
-rw-r--r--scripts/mandi.service9
2 files changed, 9 insertions, 53 deletions
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