4 # Required-Start: apache2 postgresql
5 # Required-Stop: apache2 postgresql
6 # Default-Start: 2 3 4 5
8 # Short-Description: AIS server
9 # Description: Start/stop the AIS aquisition daemon and the job runner
12 # XXX Server to installed with:
13 # ln -s THISFILE /etc/init.d/ais
14 # update-rc.d ais defaults
18 . /lib/lsb/init-functions
22 [ -r /etc/ais/database ] && RUN_PARAMS=--db
23 log_daemon_msg "Starting AIS acquisition"
24 if sudo -u nirgal python -m ais.inputs.run $RUN_PARAMS
26 log_success_msg ais.inputs.run
28 log_failure_msg failed
30 log_daemon_msg "Starting AIS job runner"
31 if [ -r /etc/ais/database ]
33 if sudo -u nirgal python -m ais.jobrunner --debug
35 log_success_msg ais.jobrunner
37 log_failure_msg failed
40 log_warning_msg "Disabled because there is no /etc/ais/database"
44 log_success_msg "Not implemented"
48 log_success_msg "Usage: ais.sh {start|stop}"