3 # Provides: openerp-server
4 # Required-Start: $remote_fs $syslog
5 # Required-Stop: $remote_fs $syslog
6 # Default-Start: 2 3 4 5
8 # Short-Description: Start openerp daemon at boot time
9 # Description: Enable service provided by daemon.
12 ## more info: http://wiki.debian.org/LSBInitScripts
14 PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin
15 DAEMON=/usr/bin/openerp-server
18 CONFIG=/etc/odoo/openerp-server.conf
19 LOGFILE=/var/log/odoo/odoo-server.log
20 PIDFILE=/var/run/${NAME}.pid
24 test -x $DAEMON || exit 0
28 start-stop-daemon --start --quiet --pidfile $PIDFILE --chuid $USER:$USER --background --make-pidfile --exec $DAEMON -- --config $CONFIG --logfile $LOGFILE
32 start-stop-daemon --stop --quiet --pidfile $PIDFILE --oknodo --retry 3
37 start-stop-daemon --status --quiet --pidfile $PIDFILE
44 echo -n "Starting $DESC: "
49 echo -n "Stopping $DESC: "
54 echo -n "Restarting $DESC: "
61 echo -n "Status of $DESC: "
62 _status && echo "running" || echo "stopped"
66 echo "Usage: $N {start|stop|restart|force-reload|status}" >&2