Page 1 of 1
ser2sock.pid?

Posted:
Sat Aug 29, 2015 12:18 pm
by jplee3
Anyone else having trouble not being able to get ser2sock to generate a pid in /var/run?
Re: ser2sock.pid?

Posted:
Sat Aug 29, 2015 12:58 pm
by jplee3
To give some background, I just installed the AlarmDecoder image on my Raspi and everytime I boot/reboot it comes back with this error in /var/log/syslog:
Aug 29 13:52:48 alarmdecoder ser2sock[2191]: [‼] Error opening pid file /var/run/ser2sock.pid
If I `touch ser2sock.pid` and then chown it to pi:pi, things work as expected. But it looks like everything in /var/run is set to root:root by default and will revert back when rebooted as well.
Re: ser2sock.pid?

Posted:
Sat Aug 29, 2015 1:45 pm
by jplee3
If I restart the service as the root user, there are no problems of course. It seems during boot/init though, the service seems to run as the pi user. Any way to change this?
Re: ser2sock.pid?

Posted:
Sat Aug 29, 2015 3:42 pm
by kevin
As a workaround you can edit the /etc/init.d/ser2sock file and change the PID_FILE variable location to something writable by pi:pi on boot - thanks for pointing this out and it is now on our list of things to look at for the next image

Re: ser2sock.pid?

Posted:
Sat Aug 29, 2015 3:50 pm
by jplee3
kevin wrote:As a workaround you can edit the /etc/init.d/ser2sock file and change the PID_FILE variable location to something writable by pi:pi on boot - thanks for pointing this out and it is now on our list of things to look at for the next image

Ahh, thanks. I was pulling my hair out over that. I changed to /tmp and it seems to be OK now. Rebooting the Pi and *crossing fingers* - it should be OK though I think.