Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:p_conrad
netqmail
qmail-mtp-initscript
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File qmail-mtp-initscript of Package netqmail
#!/bin/sh # # init.d/netqmail-smtpd # # Handles tcpserver for smtpd on smtp port. # Handles tcpserver for smtpd on port 24 (meant for local queueing). # # (C) 2011-2013 Peter Conrad <conrad@quisquis.de> # Richard Kunze <kunze@tivano.de> # # This file is licensed under the terms of the # GNU General Public License Version 2. A copy of these terms should be # enclosed as "gpl-2.0.txt" in the package containing this file. # ### BEGIN INIT INFO # Provides: netqmail-smtpd # Required-Start: $local_fs $network $remote_fs # Required-Stop: $local_fs $network $remote_fs # Default-Start: 3 5 # Default-Stop: 0 1 2 4 6 # Description: Start qmail's SMTP daemon # Short-Description: Start SMTP daemon ### END INIT INFO if [ -r /etc/rc.status ]; then . /etc/rc.status rc_reset elif [ -r /lib/lsb/init-functions ]; then . /lib/lsb/init-functions rc_status () { stat=$? if [ "$1" = "-v" ]; then case "$stat" in 0) log_success_msg; ;; 1|2) log_failure_msg; ;; *) log_warning_msg; ;; esac fi } fi if [ -r /etc/default/netqmail ] ; then # Debian . /etc/default/netqmail fi if [ -r /etc/sysconfig/netqmail ] ; then # SuSE . /etc/sysconfig/netqmail fi if [ -z "$BIND_ADDR" ]; then BIND_ADDR=0 fi PATH=/bin:/usr/bin:/sbin:/usr/sbin export PATH # running name pidfile running() { if [ ! -r "$2" ]; then return 1 fi read pid <"$2" if [ -z "$pid" ]; then return 1 fi if [ ! -r "/proc/$pid/cmdline" ]; then return 1 fi grep -q "$1" "/proc/$pid/cmdline" } case "$1" in start) echo -n "Starting qmail-smtpds..." for IP in $BIND_ADDR ; do if running qmail-smtpd /var/run/qmail-smtpd.$IP.pid; then : else (( env - PATH=@QMAIL_EXECDIR@:$PATH \ envdir @QMAIL_CONFDIR@/env envuidgid qmaild sh -c \ "exec tcpserver -u \$UID -g \$GID -R -v -x /etc/tcprules.smtpd.cdb\ -c 20 $IP smtp $RELAYLOCK qmail-smtpd \$SMTPAUTH_CHECKPASSWD 2>&1"& echo $! >/var/run/qmail-smtpd.$IP.pid ) | \ @QMAIL_EXECDIR@/splogger smtpd 3 ) & fi done rc_status -v ;; stop) echo -n "Shutting down qmail-smtpds..." for PIDFILE in /var/run/qmail-smtpd.*.pid; do if running qmail-smtpd "$PIDFILE"; then kill `cat "$PIDFILE"` fi rm "$PIDFILE" done rc_status -v ;; restart) "$0" stop && "$0" start ;; condrestart|try-restart) for PIDFILE in /var/run/qmail-smtpd.*.pid ; do if [ -r "$PIDFILE" ] ; then "$0" restart exit 0 fi done ;; reload|force-reload) # Control files are re-read for every new connection ;; status) STATUS=2 for PIDFILE in /var/run/qmail-smtpd.*.pid ; do if running qmail-smtpd "$PIDFILE"; then STATUS=0 elif [ -r "$PIDFILE" ] ; then exit 1 fi done exit $STATUS ;; *) echo "Usage: $0 {start|stop|restart|condrestart|try-restart|reload|force-reload|status}" exit 1 esac exit 0
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor