Projet

Général

Profil

0002-debian-add-postinst-and-triggers-files-for-hobo-rede.patch

Benjamin Dauvergne, 04 janvier 2016 10:11

Télécharger (1,37 ko)

Voir les différences:

Subject: [PATCH 2/2] debian: add postinst and triggers files for hobo-redeploy
 (#8894)

 debian/postinst | 41 +++++++++++++++++++++++++++++++++++++++++
 debian/triggers |  1 +
 2 files changed, 42 insertions(+)
 create mode 100644 debian/postinst
 create mode 100644 debian/triggers
debian/postinst
1
#!/bin/sh
2

  
3
set -e
4

  
5
NAME=wcs
6
DAEMON=/usr/sbin/wcsctl
7
WCS_USER=www-data
8
CONFIG_FILE=/etc/wcs/wcs.cfg
9

  
10
# Read config file if it is present.
11
if [ -r /etc/default/$NAME ]
12
then
13
	. /etc/default/$NAME
14
fi
15

  
16
if [ $CONFIG_FILE ]; then
17
    COMMAND="$DAEMON -f $CONFIG_FILE"
18
else
19
    COMMAND="$DAEMON"
20
fi
21

  
22
case "$1" in
23
    configure)
24
    ;;
25

  
26
    triggered)
27
        su -c "$COMMAND check_hobos --redeploy" www-data
28
    ;;
29

  
30
    abort-upgrade|abort-remove|abort-deconfigure)
31
    ;;
32

  
33
    *)
34
        echo "postinst called with unknown argument \`$1'" >&2
35
        exit 1
36
    ;;
37
esac
38

  
39
#DEBHELPER#
40

  
41
exit 0
debian/triggers
1
interest-noawait hobo-redeploy
0
-