#!/bin/sh # postgresql This is the init script for starting up the PostgreSQL # server # # chkconfig: 345 65 35 # description: Starts and stops Nuxeo # Source function library. . /etc/rc.d/init.d/functions SUBIT="su - nuxeo -c " start(){ $SUBIT "NUXEO_CONF="${nuxeo.conf.dir}/nuxeo.conf" /opt/nuxeo/bin/nuxeoctl startbg " action $"Starting $prog: " /bin/true return 0 } stop(){ $SUBIT "NUXEO_CONF="${nuxeo.conf.dir}/nuxeo.conf" /opt/nuxeo/bin/nuxeoctl stop " action $"Stopping $prog: " /bin/true return 0 } status(){ $SUBIT "NUXEO_CONF="${nuxeo.conf.dir}/nuxeo.conf" /opt/nuxeo/bin/nuxeoctl status " action $"Status $prog: " /bin/true return 0 } restart(){ stop start } # See how we were called. case "$1" in start) start ;; stop) stop ;; status) status ;; restart) restart ;; *) echo $"Usage: $0 {start|stop|status|restart}" exit 1 esac exit $script_result