Skip to content

Install as a daemon

dny238 edited this page Jun 9, 2015 · 38 revisions

These steps are presented as guidelines. Your results may vary, depending on operating system, installation path and other settings.

Ubuntu

This installation assumes Headphones is installed to /opt/headphones. Make sure all paths are correct and accessible. A common mistake is that a daemon user has no read and/or write permissions.

  • cd /opt/headphones
  • sudo touch /etc/default/headphones
  • Optional:
    • sudo adduser --system --no-create-home headphones
    • sudo chown headphones:nogroup -R /opt/headphones
  • Adjust settings in /etc/default/headphones. See the comments in /opt/headphones/init-scripts/init.ubuntu for the list of parameters.
  • sudo chmod +x /opt/headphones/init-scripts/init.ubuntu
  • sudo ln -s /opt/headphones/init-scripts/init.ubuntu /etc/init.d/headphones
  • sudo update-rc.d headphones defaults
  • sudo service headphones [start | stop | reload | restart]

CentOS / RedHat

This installation assumes Headphones is installed to /opt/headphones. Make sure all paths are correct and accessible. A common mistake is that a daemon user has no read and/or write permissions.

  • sudo adduser --system sabnzbd
  • mkdir /home/sabnzbd
  • mkdir /etc/headphones
  • mkdir -R chown sabnzbd:sabnzbd /home/sabnzbd
  • cd /home/sabnzbd
  • git clone https://github.com/rembo10/headphones.git
  • sudo cp /home/sabnzbd/headphones/init-scripts/init.fedora.centos.systemd /home/sabnzbd/headphones/init-scripts/headphones.service
  • sudo chmod +x /home/sabnzbd/headphones/init-scripts/headphones.service
  • sudo touch /etc/headphones/headphones.ini
  • sudo chown sabnzbd:sabnzbd /etc/headphones/headphones.ini
  • sudo cp /home/sabnzbd/headphones/init-scripts/headphones.service /lib/systemd/system/headphones.service
  • sudo systemctl daemon-reload
  • sudo systemctl enable headphones.service
  • sudo service headphones [start | stop | reload | restart]

Synology

  • Go to your DSM > Users > Create user and create user headphones
  • chown -R headphones:users /volume1/@appstore/headphones
  • wget -O /opt/etc/init.d/S99headphones.sh http://dl.dropbox.com/u/5653370/syn_files/headphones/S99headphones.sh
  • chmod a+x /opt/etc/init.d/S99headphones.sh
  • /opt/etc/init.d/S99headphones.sh [start | stop | restart | update]

Mac OS X

Tested on Mac OS X 10.8.2. Assumes Headphones is installed to /Applications/Headphones/

  • ln -s /Applications/Headphones/init-scripts/init.osx ~/Library/LaunchAgents/com.rembo10.headphones.plist
  • launchctl [load | unload] ~/Library/LaunchAgents/com.rembo10.headphones.plist
Clone this wiki locally