debian/cubicweb-ctl.cubicweb.init
author Denis Laxalde <denis.laxalde@logilab.fr>
Wed, 16 Mar 2016 10:06:18 +0100
changeset 11213 5c4c0b96c522
parent 10235 684215aca046
permissions -rw-r--r--
[pkg] Use Twisted < 16.0.0 We have some test failures with 16.0.0, such as: - test_put_content (unittest_server.ETwistHTTPTC) - test_base_url (unittest_httptest.TwistedCWAnonTC) (grafted from 10c12f31d0fe38c2e8814176fc42bf2ea210efdf)

#!/bin/sh -e

### BEGIN INIT INFO
# Provides:          cubicweb
# Required-Start:    $remote_fs $syslog $local_fs $network
# Required-Stop:     $remote_fs $syslog $local_fs $network
# Should-Start:      postgresql
# Should-Stop:       postgresql
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: Start cubicweb application at boot time
### END INIT INFO

# FIXME Seems to be inadequate here
cd /tmp

# FIXME Work-around about the following lintian error
#     E: cubicweb-ctl: init.d-script-does-not-implement-required-option /etc/init.d/cubicweb start
#
# Check if we are sure to not want the start-stop-daemon machinery here
# Refer to Debian Policy Manual section 9.3.2 (Writing the scripts) for details.

case $1 in
    force-reload)
        python -W ignore /usr/bin/cubicweb-ctl reload --force
        ;;
    status)
        python -W ignore /usr/bin/cubicweb-ctl status
        ;;
    start|stop|restart|*)
        python -W ignore /usr/bin/cubicweb-ctl $1 --force
        ;;
esac