Project

General

Profile

Bug #1232

Disappearing PID Directories

Added by bigfoot65 almost 8 years ago. Updated over 7 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Apps
Target version:
Start date:
12/22/2013
Due date:
% Done:

0%


Description

In the apps SABnzbd Plus and CouchPotato, when you restart the HDA the directories for the PID files disappear. They are removed for some reason, preventing the apps from properly starting.

This could also affect HeadPhones and SickBeard as I have not had a chance to test them yet. The options are to update the apps to recreate the directories whenever the service is restarted or potentially eliminate remove the PID file options from the .service files.

More testing is needed before a solid solution is determined.

History

#1 Updated by bigfoot65 almost 8 years ago

Headphones is affected as well, but SickBeard appears to be fine. Still exploring a solution.

#2 Updated by bigfoot65 almost 8 years ago

Current work around for these apps is to do the following for each after reboot as root user:

SABnzbd Plus:
mkdir -P /var/run/sabnzbd && chown apache:users /var/run/sabnzbd
systemctl restart sabnzbd.service

CouchPotato:
mkdir -P /var/run/couchpotato && chown apache:users /var/run/couchpotato
systemctl restart couchpotato.service

HeadPhones:
mkdir -P /var/run/headphones && chown apache:users /var/run/headphones
systemctl restart headphones.service

This is ONLY a temporary work around until we can resolve the issue.

#3 Updated by bigfoot65 over 7 years ago

  • Status changed from New to Closed

Finally found a viable solution.
http://blog.hqcodeshop.fi/archives/93-Handling-varrun-with-systemd.html

Added these lines below [Service] and above the ExecStart:
  1. Creates PID directory and stays on reboot
    PermissionsStartOnly=true
    ExecStartPre=-/usr/bin/mkdir /var/run/headphones/
    ExecStartPre=/usr/bin/chown -R apache:users /var/run/headphones/

For each app affected, this was added and the directory name and ownership change accordingly.

It was also recommended to add this line below Type=Forking:
PrivateTmp=yes

Bug resolved!

Also available in: Atom