#! /bin/sh set -e ### BEGIN INIT INFO # Provides: iked # Required-Start: # Required-Stop: # Should-Start: # Should-Stop: # Default-Start: 3 5 # Default-Stop: 0 1 2 6 # Short-Description: The Shrew Soft IKE daemon # Description: start and stop the Shrew Soft IKE daemon ### END INIT INFO # # Start script for SuSe /lib/lsb/init-functions # test -x /usr/sbin/iked || exit 0 . /lib/lsb/init-functions export PATH="${PATH:+$PATH:}/usr/sbin:/sbin" case "$1" in start) echo "Starting Shrew Soft IKE daemon..." /usr/sbin/iked || echo "Error: Couldn't start IKE daemon!" echo "IKE daemon started" ;; stop) echo "Stopping Shrew Soft IKE daemon..." killall iked || echo "Error: Couldn't stop IKE daemon!" echo "IKE daemon stopped" ;; restart) echo "Restarting Shrew Soft IKE daemon..." killall iked || echo "Error: Couldn't stop IKE daemon!" /usr/sbin/iked || echo "Error: Couldn't start IKE daemon!" echo "IKE daemon started" ;; *) echo "Usage: /etc/init.d/iked {start|stop|restart}" exit 1 esac exit 0