debian/cubicweb-ctl.cubicweb.init
author Rémi Cardona <remi.cardona@logilab.fr>, Julien Cristau <julien.cristau@logilab.fr>
Thu, 26 Nov 2015 11:30:54 +0100
changeset 10935 049209b9e9d6
parent 10235 684215aca046
permissions -rw-r--r--
[qunit] stop dealing with filesystem paths qunit tests need a few things served by cubicweb: - qunit itself, which is now handled by CWDevtoolsStaticController (serving files in cubicweb/devtools/data) - standard cubicweb or cubes data files, handled by the DataController - the tests themselves and their dependencies. These can live in <apphome>/data or <apphome>/static and be served by one of the STATIC_CONTROLLERS This avoids having to guess in CWSoftwareRootStaticController where to serve things from (some files may be installed, others are in the source tree), and should hopefully make it possible to have these tests pass when using tox, and to write qunit tests for cubes, outside of cubicweb itself. This requires modifying the tests to only declare URL paths instead of filesystem paths, and moving support files below test/data/static.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
     1
#!/bin/sh -e
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
     2
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
     3
### BEGIN INIT INFO
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
     4
# Provides:          cubicweb
6917
e080e7465ac4 [debian] fix lintian errors
Julien Jehannet <julien.jehannet@logilab.fr>
parents: 6803
diff changeset
     5
# Required-Start:    $remote_fs $syslog $local_fs $network
e080e7465ac4 [debian] fix lintian errors
Julien Jehannet <julien.jehannet@logilab.fr>
parents: 6803
diff changeset
     6
# Required-Stop:     $remote_fs $syslog $local_fs $network
10235
684215aca046 Remove remote repository-access-through-pyro support
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents: 7788
diff changeset
     7
# Should-Start:      postgresql
684215aca046 Remove remote repository-access-through-pyro support
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents: 7788
diff changeset
     8
# Should-Stop:       postgresql
0
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
     9
# Default-Start:     2 3 4 5
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
    10
# Default-Stop:      0 1 6
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
    11
# Short-Description: Start cubicweb application at boot time
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
    12
### END INIT INFO
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
    13
858
e6ae125d5903 reorganize debian packages (Closes: #1168)
Julien Jehannet <julien.jehannet@logilab.fr>
parents: 0
diff changeset
    14
# FIXME Seems to be inadequate here
0
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
    15
cd /tmp
858
e6ae125d5903 reorganize debian packages (Closes: #1168)
Julien Jehannet <julien.jehannet@logilab.fr>
parents: 0
diff changeset
    16
e6ae125d5903 reorganize debian packages (Closes: #1168)
Julien Jehannet <julien.jehannet@logilab.fr>
parents: 0
diff changeset
    17
# FIXME Work-around about the following lintian error
e6ae125d5903 reorganize debian packages (Closes: #1168)
Julien Jehannet <julien.jehannet@logilab.fr>
parents: 0
diff changeset
    18
#     E: cubicweb-ctl: init.d-script-does-not-implement-required-option /etc/init.d/cubicweb start
e6ae125d5903 reorganize debian packages (Closes: #1168)
Julien Jehannet <julien.jehannet@logilab.fr>
parents: 0
diff changeset
    19
#
e6ae125d5903 reorganize debian packages (Closes: #1168)
Julien Jehannet <julien.jehannet@logilab.fr>
parents: 0
diff changeset
    20
# Check if we are sure to not want the start-stop-daemon machinery here
e6ae125d5903 reorganize debian packages (Closes: #1168)
Julien Jehannet <julien.jehannet@logilab.fr>
parents: 0
diff changeset
    21
# Refer to Debian Policy Manual section 9.3.2 (Writing the scripts) for details.
e6ae125d5903 reorganize debian packages (Closes: #1168)
Julien Jehannet <julien.jehannet@logilab.fr>
parents: 0
diff changeset
    22
3001
74e842e4871a B fix the cubicweb init script
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 858
diff changeset
    23
case $1 in
74e842e4871a B fix the cubicweb init script
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 858
diff changeset
    24
    force-reload)
6803
691dac4c6a05 [c-c] #1193302: Only show Deprecation warnings when using cubicweb-ctl (not /etc/init.d/cubicweb)
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 3001
diff changeset
    25
        python -W ignore /usr/bin/cubicweb-ctl reload --force
3001
74e842e4871a B fix the cubicweb init script
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 858
diff changeset
    26
        ;;
74e842e4871a B fix the cubicweb init script
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 858
diff changeset
    27
    status)
6803
691dac4c6a05 [c-c] #1193302: Only show Deprecation warnings when using cubicweb-ctl (not /etc/init.d/cubicweb)
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 3001
diff changeset
    28
        python -W ignore /usr/bin/cubicweb-ctl status
3001
74e842e4871a B fix the cubicweb init script
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 858
diff changeset
    29
        ;;
6917
e080e7465ac4 [debian] fix lintian errors
Julien Jehannet <julien.jehannet@logilab.fr>
parents: 6803
diff changeset
    30
    start|stop|restart|*)
6803
691dac4c6a05 [c-c] #1193302: Only show Deprecation warnings when using cubicweb-ctl (not /etc/init.d/cubicweb)
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 3001
diff changeset
    31
        python -W ignore /usr/bin/cubicweb-ctl $1 --force
3001
74e842e4871a B fix the cubicweb init script
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 858
diff changeset
    32
        ;;
858
e6ae125d5903 reorganize debian packages (Closes: #1168)
Julien Jehannet <julien.jehannet@logilab.fr>
parents: 0
diff changeset
    33
esac