crux-musl

Unnamed repository; edit this file 'description' to name the repository.
git clone https://codeberg.org/emmett1/crux-musl
Log | Files | Refs | README | LICENSE

exim (860B)


      1 #!/bin/sh
      2 #
      3 # /etc/rc.d/exim: start/stop exim daemon
      4 #
      5 
      6 SSD=/sbin/start-stop-daemon
      7 PROG=/usr/sbin/exim
      8 PID=/run/exim.pid
      9 OPTS="-bd -q15m"
     10 
     11 CRT=/etc/ssl/certs/exim.crt
     12 KEY=/etc/ssl/keys/exim.key
     13 
     14 case $1 in
     15 start)
     16 	if [ ! -s $CRT -o ! -s $KEY ]; then 
     17 		/usr/bin/mksslcert $KEY $CRT
     18 		chown mail $CRT $KEY
     19 	fi
     20 	$SSD --start --pidfile $PID --exec $PROG -- $OPTS
     21 	;;
     22 stop)
     23 	$SSD --stop --remove-pidfile --retry 10 --pidfile $PID
     24 	;;
     25 restart)
     26 	$0 stop
     27 	$0 start
     28 	;;
     29 reload)
     30 	$SSD --stop --signal HUP --pidfile $PID
     31 	;;
     32 status)
     33 	$SSD --status --pidfile $PID
     34 	case $? in
     35 	0) echo "$PROG is running with pid $(cat $PID)" ;;
     36 	1) echo "$PROG is not running but the pid file $PID exists" ;;
     37 	3) echo "$PROG is not running" ;;
     38 	4) echo "Unable to determine the program status" ;;
     39 	esac
     40 	;;
     41 *)
     42 	echo "usage: $0 [start|stop|restart|reload|status]"
     43 	;;
     44 esac
     45 
     46 # End of file