Signed-off-by: fbt <fbt@fleshless.org>
This commit is contained in:
2017-12-10 20:44:17 +03:00
parent e6f85aa437
commit d85b1945e9
115 changed files with 132 additions and 238 deletions

20
services/lo.iface Executable file
View File

@@ -0,0 +1,20 @@
#!/usr/bin/env ssm
cfg_iface="${service_name%%.*}"
service_type='oneshot'
service_command=( /usr/bin/ip link set "$cfg_iface" up )
ready() {
local iface="$1" timer='0' timeout='6'
until [[ "$(ip link show $iface up)" ]]; do
(( timer >= timeout )) && { return 1; }
(( timer++ ))
done
}
pre_stop() {
ip link set "${cfg_iface}" down
super_stop
}