Skip to content

Commit

Permalink
debian: Move cache to /var when started from init script
Browse files Browse the repository at this point in the history
  • Loading branch information
jodal committed Jan 12, 2014
1 parent 3713fb1 commit bddbc55
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 0 deletions.
7 changes: 7 additions & 0 deletions debian/changelog
@@ -1,3 +1,10 @@
mopidy-spotify (1.0.3-0mopidy2) unstable; urgency=low

* Add config file to /etc/mopidy/extensions.d for using /var/lib and
/var/cache instead of XDG dirs when Mopidy is started from an init script.

-- Stein Magnus Jodal <stein.magnus@jodal.no> Sun, 12 Jan 2014 02:55:05 +0100

mopidy-spotify (1.0.3-0mopidy1) unstable; urgency=low

* New upstream release.
Expand Down
3 changes: 3 additions & 0 deletions debian/dirs
@@ -0,0 +1,3 @@
etc/mopidy/extensions.d
var/lib/mopidy/spotify
var/cache/mopidy/spotify
3 changes: 3 additions & 0 deletions debian/etc/spotify.conf
@@ -0,0 +1,3 @@
[spotify]
cache_dir = /var/cache/mopidy/spotify
settings_dir = /var/lib/mopidy/spotify
1 change: 1 addition & 0 deletions debian/install
@@ -1 +1,2 @@
usr/share/mopidy
debian/etc/spotify.conf etc/mopidy/extensions.d
25 changes: 25 additions & 0 deletions debian/postinst
@@ -0,0 +1,25 @@
#!/bin/sh
# postinst script for mopidy-spotify

set -e

case "$1" in
configure)
# spotify.conf may contain passwords and other confidential information
chown mopidy:root /etc/mopidy/extensions.d/spotify.conf
chmod 640 /etc/mopidy/extensions.d/spotify.conf
;;

abort-upgrade|abort-remove|abort-deconfigure)
;;

*)
echo "postinst called with unknown argument \`$'" >&2
exit 1
;;

esac

#DEBHELPER#

exit 0

0 comments on commit bddbc55

Please sign in to comment.