Private
Server IP : 195.201.23.43  /  Your IP : 3.16.111.78
Web Server : Apache
System : Linux webserver2.vercom.be 5.4.0-192-generic #212-Ubuntu SMP Fri Jul 5 09:47:39 UTC 2024 x86_64
User : kdecoratie ( 1041)
PHP Version : 7.1.33-63+ubuntu20.04.1+deb.sury.org+1
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /etc/rc3.d/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME SHELL ]     

Current File : /etc/rc3.d/K01milter-greylist
#! /bin/sh

# Greylist init script
# July 2004
# BERTRAND Joël
#
### BEGIN INIT INFO
# Provides:                 milter-greylist
# Required-Start:    $local_fs $named $remote_fs $syslog
# Required-Stop:     $local_fs $remote_fs
# Should-Start:             sendmail
# Should-Stop:
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: Script to start/stop the greylist-milter
# Description: another spam-defense service
### END INIT INFO

. /lib/lsb/init-functions

# Based on skeleton by Miquel van Smoorenburg and Ian Murdock

PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin
DAEMON=/usr/sbin/milter-greylist
NAME=greylist
SNAME=greylist
DESC="Greylist Mail Filter Daemon"
PIDFILE="/var/run/$NAME.pid"
PNAME="milter-greylist"
USER="greylist"
SOCKET=/var/run/milter-greylist/milter-greylist.sock


[ -x $DAEMON ] || DAEMON=/usr/bin/milter-greylist
[ -x $DAEMON ] || exit 0


export TMPDIR=/tmp
# Apparently people have trouble if this isn't explicitly set...

ENABLED=0
OPTIONS=""
NICE=

test -f /etc/default/milter-greylist && . /etc/default/milter-greylist

DOPTIONS="-P $PIDFILE -u $USER -p $SOCKET"

if [ "$ENABLED" = "0" ]; then
    echo "$DESC: disabled, see /etc/default/milter-greylist"
    exit 0
fi

if ! getent passwd | grep -q "^greylist:"; then
  echo "$0: greylist user does not exist. Aborting" >&2
  exit 1
fi
if ! getent group | grep -q "^greylist:" ; then
  echo "$0: greylist group does not exist. Aborting" >&2
  exit 1
fi

if [ ! -d /var/run/$PNAME ]; then
  mkdir /var/run/$PNAME
  chown greylist:greylist /var/run/$PNAME
  chmod 755 /var/run/$PNAME
fi

set -e

case "$1" in
  start)
	echo -n "Starting $DESC: "
	start-stop-daemon --start --pidfile $PIDFILE --name $PNAME \
	    $NICE --oknodo --startas $DAEMON -- $OPTIONS $DOPTIONS
	echo "$NAME."
	;;

  stop)
	echo -n "Stopping $DESC: "
	start-stop-daemon --stop --pidfile $PIDFILE --name $PNAME --oknodo
	echo "$NAME."
	;;

  restart|force-reload)
	echo -n "Restarting $DESC: "
	start-stop-daemon --stop --pidfile $PIDFILE --name $PNAME \
	    --retry 5 --oknodo
	start-stop-daemon --start --pidfile $PIDFILE --name $PNAME \
	    $NICE --oknodo --startas $DAEMON -- $OPTIONS $DOPTIONS

	echo "$NAME."
	;;

  reload)
	echo -n "Checking config: "
	if sudo -c "$DAEMON -c" $USER 2>&1 |grep -v 'config .* okay$' |grep . >&2
	then
	  echo "failed.  Quitting with error, no action taken."
	  exit 1
	else
	  echo "passed."
	fi
	echo -n "Restarting $DESC: "
	start-stop-daemon --stop --pidfile $PIDFILE --name $PNAME \
	    --retry 5 --oknodo
	start-stop-daemon --start --pidfile $PIDFILE --name $PNAME \
	    $NICE --oknodo --startas $DAEMON -- $OPTIONS $DOPTIONS

	echo "$NAME."
	;;

  status)
  	PID=`pidof $DAEMON`
	if [ x$PID = x ]; then
	  echo "$DAEMON is not running"
	else
	  echo "$DESC is running with pid[$PID]"
	fi
	;;
  *)
	N=/etc/init.d/$SNAME
	echo "Usage: $N {start|stop|restart|reload|force-reload|status}" >&2
	exit 1
	;;
esac

exit 0
Private