Merge branch 'master' of builder:git/watchman-services

This commit is contained in:
Jack L. Frost 2015-01-19 16:59:13 +03:00
commit 6294cf9c6f
6 changed files with 5 additions and 29 deletions

View File

@ -1,8 +0,0 @@
#!/usr/bin/env watchman
# Config for devfs-permissions
cfg_devices=(
'/dev/snd;root:audio;770'
'/dev/dri;root:video;770'
'/dev/fuse;root:root;777'
)

View File

@ -2,7 +2,7 @@
#service_respawn='true' #service_respawn='true'
service_username='torrent' service_username='torrent'
service_command='sudo' service_command='/usr/bin/sudo'
service_args="-u $service_username -- /usr/bin/bitflu --config=/etc/bitflu.cfg" service_args="-u $service_username -- /usr/bin/bitflu --config=/etc/bitflu.cfg"
start() { start() {

View File

@ -1,17 +0,0 @@
#!/usr/bin/env watchman
# This is a script to set up the right permissions in /dev in absence of e?(u|s?m)dev.
service_type='oneshot'
# Config moved to conf.d
spawn() {
for d in "${cfg_devices[@]}"; do
IFS=';' read device owner perms <<< "$d"
[[ -e "$device" ]] && {
chown -R "$owner" "$device"
chmod -R "$perms" "$device"
}
done
}

View File

@ -8,5 +8,5 @@ fi
[[ "$cfg_hostname" ]] || { cfg_hostname='localhost'; } [[ "$cfg_hostname" ]] || { cfg_hostname='localhost'; }
service_type='oneshot' service_type='oneshot'
service_command='hostname' service_command='/usr/bin/hostname'
service_args="$cfg_hostname" service_args="$cfg_hostname"

View File

@ -3,7 +3,8 @@
cfg_iface="${service_name%%.*}" cfg_iface="${service_name%%.*}"
service_type='oneshot' service_type='oneshot'
service_command="ip link set $cfg_iface up" service_command='/usr/bin/ip'
service_args="link set $cfg_iface up"
wait_for_iface() { wait_for_iface() {
local iface="$1" timer='0' timeout='6' local iface="$1" timer='0' timeout='6'

View File

@ -1,5 +1,5 @@
#!/usr/bin/env watchman #!/usr/bin/env watchman
service_command='mkdir' service_command='/usr/bin/mkdir'
service_args='-p /run/lock' service_args='-p /run/lock'
service_type='oneshot' service_type='oneshot'