[PATCH] 1/2 archlinux - certmaster sysv

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



add support for sysv in archlinux
-- 
              _|-  |  _  _
             _\|_()|<(/__\
 .----------------------------------.
( astokes@xxxxxxxxxx                 )
 `----------------------------------'
#!/bin/bash

. /etc/rc.conf
. /etc/rc.d/functions

[ -x /usr/bin/certmaster ] || exit 0

SERVICE=certmaster
PROCESS=certmaster
DAEMON=/usr/bin/certmaster
CONFIG_ARGS="--daemon"
PID=`pidof -o %PPID $DAEMON`

start () {
        stat_busy "Starting $PROCESS"
        [ -z "$PID" ] && $DAEMON $CONFIG_ARGS
        RETVAL=$?
        if [ $RETVAL -gt 0 ]; then
                stat_fail
        else
                add_daemon $PROCESS
        fi

        stat_done
}

stop () {
        stat_busy "Stopping $PROCESS"
        [ ! -z "$PID" ] && kill $PID &> /dev/null
        RETVAL=$?
        if [ $RETVAL -gt 0]; then
                stat_fail
        else
                rm_daemon $PROCESS
                stat_done
        fi
}

restart () {
        stop
        start
}

case "$1" in
        start|stop|restart)
          $1
          ;;
        *)
          echo $"Usage : $0 {start|stop|restart}"
          exhit 1
          ;;
esac
exit $RETVAL

_______________________________________________
Func-list mailing list
Func-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/func-list

[Index of Archives]     [Fedora Users]     [Linux Networking]     [Fedora Legacy List]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux