mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-11-08 22:45:43 +00:00
43 lines
727 B
Bash
Executable file
43 lines
727 B
Bash
Executable file
#!/bin/bash
|
|
|
|
. /etc/rc.conf
|
|
. /etc/rc.d/functions
|
|
|
|
case "$1" in
|
|
start)
|
|
stat_busy "Starting Openswan IPsec"
|
|
/etc/rc.d/ipsec --start
|
|
if [ $? -gt 0 ]; then
|
|
stat_fail
|
|
else
|
|
stat_done
|
|
add_daemon openswan
|
|
fi
|
|
;;
|
|
stop)
|
|
stat_busy "Stopping Openswan IPsec"
|
|
/etc/rc.d/ipsec --stop
|
|
if [ $? -gt 0 ]; then
|
|
stat_fail
|
|
else
|
|
stat_done
|
|
rm_daemon openswan
|
|
fi
|
|
;;
|
|
restart)
|
|
stat_busy "Restarting Openswan IPsec"
|
|
/etc/rc.d/ipsec --restart
|
|
if [ $? -gt 0 ]; then
|
|
stat_fail
|
|
else
|
|
stat_done
|
|
add_daemon openswan
|
|
fi
|
|
;;
|
|
status)
|
|
/etc/rc.d/ipsec --status
|
|
;;
|
|
*)
|
|
echo "usage: $0 {start|stop|restart|status}"
|
|
esac
|
|
|