network-ups-tools: fix upsdrvctl service

upsdrvctl will not stay in the foreground, even with -D. It will start
drivers and quit. Use pause, and a separate finish script to kill the
drivers.
This commit is contained in:
Dominik Honnef 2015-06-28 05:57:45 +02:00
parent 82ce840224
commit dca2cd8d4c
2 changed files with 4 additions and 1 deletions

View file

@ -0,0 +1,2 @@
#!/bin/sh
upsdrvctl -D stop

View file

@ -1,4 +1,5 @@
#!/bin/sh
# Network UPS Tools - driver controller
install -d -m 0770 -o nut -g nut /run/ups
exec upsdrvctl -D start
upsdrvctl -D start
exec chpst -b upsdrvctl pause