Revision 507079e2
Added by Jérôme Schneider about 14 years ago
| debian/postinst | ||
|---|---|---|
|
adduser --disabled-password --quiet --system \
|
||
|
--home /var/lib/wcs-au-quotidien --no-create-home\
|
||
|
--gecos "w.c.s. Au quotidien" --group wcs-au-quotidien
|
||
|
chown wcs-au-quotidien: /var/lib/wcs-au-quotidien
|
||
|
fi
|
||
|
;;
|
||
|
abort-upgrade|abort-remove|abort-deconfigure)
|
||
| debian/rules | ||
|---|---|---|
|
#export DH_VERBOSE=1
|
||
|
|
||
|
PYTHON=/usr/bin/python
|
||
|
DESTDIR=$(CURDIR)/debian/wcs-au-quotidien
|
||
|
|
||
|
build: build-stamp
|
||
|
|
||
| ... | ... | |
|
dh_clean -k
|
||
|
dh_installdirs
|
||
|
|
||
|
$(PYTHON) setup.py install --prefix=$(CURDIR)/debian/wcs-au-quotidien/usr --no-compile
|
||
|
$(PYTHON) setup.py install --prefix=$(DESTDIR)/usr --no-compile
|
||
|
for i in $(CURDIR)/debian/wcs-au-quotidien/usr/lib/python2.*; do \
|
||
|
mv $$i/site-packages/extra \
|
||
|
$$i/site-packages/extra-wcs-au-quotidien; done
|
||
|
cd po && make install prefix=$(CURDIR)/debian/wcs-au-quotidien/
|
||
|
install -d -m 755 $(DESTDIR)/var/lib/wcs-au-quotidien $(DESTDIR)/etc/wcs
|
||
|
install -m 644 wcs-au-quotidien.cfg-sample $(DESTDIR)/etc/wcs/wcs-au-quotidien.cfg
|
||
|
|
||
|
|
||
|
# Build architecture-independent files here.
|
||
| debian/wcs-au-quotidien.init | ||
|---|---|---|
|
OPTIONS="--extra /usr/lib/pymodules/python$PYTHON_VERSION/extra-wcs-au-quotidien/"
|
||
|
WCS_USER=wcs-au-quotidien
|
||
|
WCS_GROUP=wcs-au-quotidien
|
||
|
CONFIG_FILE=/etc/wcs/wcs-au-quotidien.cfg
|
||
|
|
||
|
# Gracefully exit if the package has been removed.
|
||
|
test -x $DAEMON || exit 0
|
||
| ... | ... | |
|
# Function that starts the daemon/service.
|
||
|
#
|
||
|
d_start() {
|
||
|
start-stop-daemon --start --quiet --pidfile $PIDFILE \
|
||
|
--chuid $WCS_USER:$WCS_GROUP \
|
||
|
--make-pidfile --background --exec $DAEMON -- start $OPTIONS
|
||
|
if [ $CONFIG_FILE ]; then
|
||
|
start-stop-daemon --start --quiet --pidfile $PIDFILE \
|
||
|
--chuid $WCS_USER:$WCS_GROUP --make-pidfile --background \
|
||
|
--exec $DAEMON -- -f $CONFIG_FILE start $OPTIONS
|
||
|
else
|
||
|
start-stop-daemon --start --quiet --pidfile $PIDFILE \
|
||
|
--chuid $WCS_USER:$WCS_GROUP --make-pidfile --background \
|
||
|
--exec $DAEMON -- start $OPTIONS
|
||
|
fi
|
||
|
}
|
||
|
|
||
|
#
|
||
| wcs-au-quotidien.cfg-sample | ||
|---|---|---|
|
[main]
|
||
|
app_dir = /var/lib/wcs-au-quotidien
|
||
|
data_dir = /usr/share/wcs
|
||
|
auto_create_appdir = true # Automatically create vhost
|
||
|
use_long_traces = true
|
||
|
#error_log = /var/lib/wcs-au-quotidien/error.log
|
||
|
# Redirect on unknown virtual host
|
||
|
#missing_appdir_redirect = http://www.mysite.com
|
||
Also available in: Unified diff
Debian packaging: use wcs au quotidien configuration file