Project

General

Profile

« Previous | Next » 

Revision 507079e2

Added by Jérôme Schneider over 12 years ago

Debian packaging: use wcs au quotidien configuration file

View differences:

debian/postinst
8 8
      adduser --disabled-password  --quiet --system \
9 9
        --home /var/lib/wcs-au-quotidien --no-create-home\
10 10
        --gecos "w.c.s. Au quotidien" --group wcs-au-quotidien
11
      chown wcs-au-quotidien: /var/lib/wcs-au-quotidien
11 12
    fi
12 13
  ;;
13 14
  abort-upgrade|abort-remove|abort-deconfigure)
debian/rules
5 5
#export DH_VERBOSE=1
6 6

  
7 7
PYTHON=/usr/bin/python
8
DESTDIR=$(CURDIR)/debian/wcs-au-quotidien
8 9

  
9 10
build: build-stamp
10 11

  
......
29 30
	dh_clean -k
30 31
	dh_installdirs
31 32

  
32
	$(PYTHON) setup.py install --prefix=$(CURDIR)/debian/wcs-au-quotidien/usr --no-compile
33
	$(PYTHON) setup.py install --prefix=$(DESTDIR)/usr --no-compile
33 34
	for i in $(CURDIR)/debian/wcs-au-quotidien/usr/lib/python2.*; do \
34 35
		mv $$i/site-packages/extra \
35 36
			$$i/site-packages/extra-wcs-au-quotidien; done
36 37
	cd po && make install prefix=$(CURDIR)/debian/wcs-au-quotidien/
38
	install -d -m 755 $(DESTDIR)/var/lib/wcs-au-quotidien $(DESTDIR)/etc/wcs
39
	install -m 644 wcs-au-quotidien.cfg-sample $(DESTDIR)/etc/wcs/wcs-au-quotidien.cfg
37 40

  
38 41

  
39 42
# Build architecture-independent files here.
debian/wcs-au-quotidien.init
20 20
OPTIONS="--extra /usr/lib/pymodules/python$PYTHON_VERSION/extra-wcs-au-quotidien/"
21 21
WCS_USER=wcs-au-quotidien
22 22
WCS_GROUP=wcs-au-quotidien
23
CONFIG_FILE=/etc/wcs/wcs-au-quotidien.cfg
23 24

  
24 25
# Gracefully exit if the package has been removed.
25 26
test -x $DAEMON || exit 0
......
34 35
#	Function that starts the daemon/service.
35 36
#
36 37
d_start() {
37
	start-stop-daemon --start --quiet --pidfile $PIDFILE \
38
		--chuid $WCS_USER:$WCS_GROUP \
39
		--make-pidfile --background --exec $DAEMON -- start $OPTIONS
38
	if [ $CONFIG_FILE ]; then
39
		start-stop-daemon --start --quiet --pidfile $PIDFILE \
40
			--chuid $WCS_USER:$WCS_GROUP --make-pidfile --background \
41
			--exec $DAEMON -- -f $CONFIG_FILE start $OPTIONS
42
	else
43
		start-stop-daemon --start --quiet --pidfile $PIDFILE \
44
			--chuid $WCS_USER:$WCS_GROUP --make-pidfile --background \
45
			--exec $DAEMON -- start $OPTIONS
46
	fi
40 47
}
41 48

  
42 49
#
wcs-au-quotidien.cfg-sample
1
[main]
2
app_dir = /var/lib/wcs-au-quotidien
3
data_dir = /usr/share/wcs
4
auto_create_appdir = true # Automatically create vhost
5
use_long_traces = true
6
#error_log = /var/lib/wcs-au-quotidien/error.log
7
# Redirect on unknown virtual host
8
#missing_appdir_redirect = http://www.mysite.com

Also available in: Unified diff