mirror of
https://github.com/rembo10/headphones.git
synced 2026-05-02 01:39:29 +01:00
Create init.upstart
Created an Upstart job.
This commit is contained in:
21
init.upstart
Normal file
21
init.upstart
Normal file
@@ -0,0 +1,21 @@
|
||||
# headphones - Automatic music downloader
|
||||
#
|
||||
# This is a session/user job. Install this file into /usr/share/upstart/sessions
|
||||
# if headphones is installed system wide, and into $XDG_CONFIG_HOME/upstart if
|
||||
# headphones is installed per user. Change the executable path appropiately.
|
||||
|
||||
start on desktop-session-start
|
||||
stop on desktop-shutdown
|
||||
|
||||
env CONFIG=""$XDG_CONFIG_HOME"/headphones/headphones.ini"
|
||||
env DATA=""$XDG_DATA_HOME"/headphones"
|
||||
|
||||
pre-start script
|
||||
[ -d "$XDG_CONFIG_HOME"/headphones ] || mkdir -p "$XDG_CONFIG_HOME"/headphones
|
||||
[ -d "$DATA" ] || mkdir -p "$DATA"
|
||||
[ -f "$CONFIG ] || touch "$CONFIG"
|
||||
end script
|
||||
|
||||
exec headphones.py --daemon --nolaunch --quiet
|
||||
--config "$CONFIG"
|
||||
--datadir "$DATA"
|
||||
Reference in New Issue
Block a user