network scripts

This commit is contained in:
2014-10-07 13:19:40 +04:00
parent 55da31df35
commit c59e83c160
2 changed files with 20 additions and 7 deletions

View File

@@ -14,8 +14,9 @@ wait_for_iface() {
done
}
spawn() {
start() {
watchman.msg "Activating the $cfg_iface interface..."
watchman.start
wait_for_iface || {
echo "Interface $cfg_iface failed to come up!"
@@ -24,13 +25,7 @@ spawn() {
}
stop() {
watchman.status || {
watchman.err "$service_name is already disabled"
return 1
}
watchman.msg "Deactivating the $cfg_iface interface..."
ip link set "${cfg_iface}" down
watchman.stop
}