debian/cubicweb-ctl.cubicweb.init
author Sylvain Thénault <sylvain.thenault@logilab.fr>
Wed, 22 Jan 2014 15:50:03 +0100
changeset 9466 c3a5f4507f12
parent 7788 cc8670be7b2e
child 10235 684215aca046
permissions -rw-r--r--
[multi-sources-removal] Turn ConnectionsSet into simpler ConnectionWrapper also, SqliteConnectionWrapper becomes a subclass. This is allowed since now ConnectionsSet responsability has been reduced to handling the system source only. This changeset also: * drops useless cnxset_set / check_connection api * deprecates former .source / .connection / container api but it renames neither the session's cnxset attribute, nor the related repository method. Related to #2919300

#!/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 pyro-nsd
# Should-Stop:       postgresql pyro-nsd
# 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
# FIXME If related to pyro, try instead:
# export PYRO_STORAGE="/tmp"
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