File spacenavd-fix-pidfile.patch of Package spacenavd

diff -up spacenavd-0.7.1/contrib/systemd/spacenavd.service.fix-pidfile spacenavd-0.7.1/contrib/systemd/spacenavd.service
--- spacenavd-0.7.1/contrib/systemd/spacenavd.service.fix-pidfile	2020-03-22 16:10:42.581821273 +0100
+++ spacenavd-0.7.1/contrib/systemd/spacenavd.service	2020-03-22 16:11:49.253400708 +0100
@@ -4,7 +4,7 @@ After=syslog.target
 
 [Service]
 Type=forking
-PIDFile=/var/run/spnavd.pid
+PIDFile=/run/spnavd.pid
 ExecStart=/usr/local/bin/spacenavd
 StandardError=syslog
 
diff -up spacenavd-0.7.1/init_script.fix-pidfile spacenavd-0.7.1/init_script
--- spacenavd-0.7.1/init_script.fix-pidfile	2020-03-22 16:10:57.213842900 +0100
+++ spacenavd-0.7.1/init_script	2020-03-22 16:12:08.165156918 +0100
@@ -30,7 +30,7 @@ start)
 stop)
 	echo 'Stopping spacenavd daemon'
 	# detect daemon's process id
-	pid=`cat /var/run/spnavd.pid 2>/dev/null`
+	pid=`cat /run/spnavd.pid 2>/dev/null`
 	if [ $? != 0 ]; then
 		pid=`ps -e | grep spacenavd | awk '{ print $1 }'`
 		if [ -z "$pid" ]; then
diff -up spacenavd-0.7.1/spnavd_ctl.fix-pidfile spacenavd-0.7.1/spnavd_ctl
--- spacenavd-0.7.1/spnavd_ctl.fix-pidfile	2020-03-22 16:11:13.009768437 +0100
+++ spacenavd-0.7.1/spnavd_ctl	2020-03-22 16:12:34.904713390 +0100
@@ -32,7 +32,7 @@ else
 fi
 
 # detect daemon's process id
-pid=`cat /var/run/spnavd.pid 2>/dev/null`
+pid=`cat /run/spnavd.pid 2>/dev/null`
 if [ $? != 0 ]; then
 	pid=`ps -e | grep spacenavd | awk '{ print $1 }'`
 	if [ -z "$pid" ]; then
diff -up spacenavd-0.7.1/src/spnavd.h.fix-pidfile spacenavd-0.7.1/src/spnavd.h
--- spacenavd-0.7.1/src/spnavd.h.fix-pidfile	2020-03-22 16:11:26.161657639 +0100
+++ spacenavd-0.7.1/src/spnavd.h	2020-03-22 16:14:26.920758060 +0100
@@ -26,8 +26,8 @@ along with this program.  If not, see <h
 #define DEF_CFGFILE		"/etc/spnavrc"
 #define DEF_LOGFILE		"/var/log/spnavd.log"
 
-#define SOCK_NAME	"/var/run/spnav.sock"
-#define PIDFILE		"/var/run/spnavd.pid"
+#define SOCK_NAME	"/run/spnav.sock"
+#define PIDFILE		"/run/spnavd.pid"
 #define SYSLOG_ID	"spnavd"
 
 /* Multiple devices support */
openSUSE Build Service is sponsored by