mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-11-08 22:45:43 +00:00
27 lines
521 B
Bash
27 lines
521 B
Bash
#!/bin/bash
|
|
|
|
. /etc/rc.conf
|
|
. /etc/rc.d/functions
|
|
|
|
case "$1" in
|
|
start)
|
|
stat_busy "Starting VDE"
|
|
vde_switch -tap tun -daemon && \
|
|
ifconfig tun 192.168.254.254 && \
|
|
chmod 777 /var/run/vde.ctl/ -R && \
|
|
add_daemon vde && \
|
|
stat_done || stat_fail
|
|
;;
|
|
stop)
|
|
stat_busy "Stopping VDE"
|
|
killall vde_switch >/dev/null && rm /var/run/vde.ctl/ -R && \
|
|
rm_daemon vde && stat_done || stat_fail
|
|
;;
|
|
restart)
|
|
$0 stop
|
|
$0 start
|
|
;;
|
|
*)
|
|
echo "usage: $0 {start|stop|restart}"
|
|
esac
|
|
exit 0
|