-
Notifications
You must be signed in to change notification settings - Fork 600
Install as a daemon
mtlife edited this page May 14, 2014
·
38 revisions
cd ~/headphones
sudo touch /etc/default/headphones
Adjust settings in /etc/default/headphones (installpath and run as user)
sudo chmod +x init-scripts/init.ubuntu
sudo ln -s /opt/headphones/init.ubuntu /etc/init.d/headphones
(optional) sudo adduser --system --no-create-home headphones
(optional) sudo chown headphones:nogroup -R /opt/headphones
sudo update-rc.d headphones defaults
sudo service headphones start | stop | reload | restart
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
Tested on Mac OS X 10.8.2. Create the following file:
~/Library/LaunchAgents/com.rembo10.headphones.plist
Now copy-paste the below and update the path to headphones.py.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.rembo10.headphones</string>
<key>ProgramArguments</key>
<array>
<string>/usr/bin/python</string>
<string>/path/to/headphones/Headphones.py</string>
</array>
<key>KeepAlive</key>
<true/>
</dict>
</plist>
To start/stop the service manually, run:
launchctl load ~/Library/LaunchAgents/com.rembo10.headphones.plist
launchctl unload ~/Library/LaunchAgents/com.rembo10.headphones.plist
Consider turning off the setting Launch Browser on Startup
so it doesn't launch when starting your computer.