Debian Codegraph @

debian/mopidy.postinst

raw
1 #!/bin/sh
2 # postinst script for mopidy
3
4 set -e
5
6 . /usr/share/debconf/confmodule
7
8 #DEBHELPER#
9
10 case "$1" in
11 configure|reconfigure)
12 db_get mopidy/daemon
13 if [ "$RET" = "true" ]; then
14 update-rc.d mopidy enable >/dev/null
15 invoke-rc.d mopidy start || exit $?
16 else
17 update-rc.d mopidy disable >/dev/null
18 invoke-rc.d mopidy stop || exit $?
19 fi
20 ;;
21
22 abort-upgrade|abort-remove|abort-deconfigure)
23 ;;
24
25 *)
26 echo "postinst called with unknown argument \`$1'" >&2
27 exit 1
28 ;;
29 esac
30
31 exit 0