openerp-2 547 B

123456789101112131415161718192021222324
  1. #!/sbin/openrc-run
  2. # Additional options that are passed to the daemon.
  3. DAEMON_OPTS="-c ${CONFIGFILE}"
  4. depend() {
  5. after postgresql
  6. }
  7. start() {
  8. checkpath -q -d -m 0755 -o openerp:openerp /run/openerp
  9. ebegin "Starting openerp server"
  10. start-stop-daemon --start --quiet --pidfile "${PIDFILE}" --exec /usr/bin/openerp-server \
  11. --make-pidfile --user "${USER}" --background -- ${DAEMON_OPTS}
  12. eend $?
  13. }
  14. stop() {
  15. ebegin "Stopping openerp server"
  16. start-stop-daemon --stop --quiet --pidfile "${PIDFILE}" --signal 9
  17. rm -f "${PIDFILE}"
  18. eend $?
  19. }