forked from pool/powerman
fcc38c79cf
OBS-URL: https://build.opensuse.org/package/show/hardware/powerman?expand=0&rev=ab3ba95c92679ae6a17a3fecd12c7688
25 lines
673 B
Diff
25 lines
673 B
Diff
--- scripts/powerman.init.in
|
|
+++ scripts/powerman.init.in
|
|
@@ -34,7 +34,8 @@
|
|
DAEMON="$sbindir/powermand"
|
|
#DAEMON_ARGS=
|
|
CONFIG=$sysconfdir/powerman/powerman.conf
|
|
-PIDFILE="$localstatedir/run/powerman/powermand.pid"
|
|
+PIDDIR="$localstatedir/run/powerman"
|
|
+PIDFILE="$PIDDIR/powermand.pid"
|
|
#NICE=
|
|
USER=@RUN_AS_USER@
|
|
#SIGHUP_RELOAD=
|
|
@@ -53,7 +54,10 @@
|
|
SCRIPT_NAME="`basename \"$0\" .init | sed 's/^[SK][0-9][0-9]*//'`"
|
|
SIGTERM_TIMEOUT="3"
|
|
STATUS=0
|
|
-
|
|
+ if [ ! -d "$PIDDIR" ] ; then
|
|
+ mkdir "$PIDDIR"
|
|
+ chown $USER $PIDDIR
|
|
+ fi
|
|
# Read configuration defaults to override variables:
|
|
# $DAEMON_ARGS, $CONFIG, $PIDFILE, $USER, $NICE, $SIGHUP_RELOAD
|
|
##
|