#!/bin/sh # # Startup script for the usogres # # chkconfig: 345 95 10 # description: real-time backup utility for PostgreSQL # processname: daemon # pidfile: /var/run/usogres.pid # config: /root/.usogresrc # Source function library. . /etc/rc.d/init.d/functions # See how we were called. case "$1" in start) echo -n "Starting usogres: " daemon /usr/local/bin/usogres RETVAL=$? echo [ $RETVAL -eq 0 ] && touch /var/lock/subsys/usogres ;; stop) echo -n "Shutting down usogres: " killproc usogres RETVAL=$? echo [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/usogres ;; status) status usogres RETVAL=$? ;; restart) $0 stop $0 start RETVAL=$? ;; *) echo "Usage: $0 {start|stop|status|restart}" exit 1 esac exit 0