Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:p_conrad
netqmail
qmail-qmtp-initscript
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File qmail-qmtp-initscript of Package netqmail
#!/bin/sh # # init.d/netqmail-qmtpd # # Handles tcpserver for qmtpd on qmtp port. # # (C) 2011-2012 Peter Conrad <conrad@quisquis.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-qmtpd # 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 QMTP daemon # Short-Description: Start QMTP 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 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" } if [ -x /usr/sbin/relaylock ]; then RELAYLOCK=relaylock else RELAYLOCK= fi case "$1" in start) echo -n "Starting qmail-qmtpd..." if running qmail-qmtpd /var/run/qmail-qmtpd.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 0 qmtp $RELAYLOCK qmail-qmtpd 2>&1'& echo $! >/var/run/qmail-qmtpd.pid ) | \ @QMAIL_EXECDIR@/splogger qmtpd 3 ) & fi rc_status -v ;; stop) echo -n "Shutting down qmail-qmtpd..." if running qmail-qmtpd "/var/run/qmail-qmtpd.pid"; then kill `cat "/var/run/qmail-qmtpd.pid"` rm "/var/run/qmail-qmtpd.pid" fi rc_status -v ;; restart) "$0" stop && "$0" start ;; condrestart|try-restart) if running qmail-qmtpd /var/run/qmail-qmtpd.pid; then "$0" restart fi ;; reload|force-reload) # Control files are re-read for every new connection ;; status) if running qmail-qmtpd /var/run/qmail-qmtpd.pid; then exit 0 fi if [ -r "/var/run/qmail-qmtpd.pid" ]; then exit 1 fi exit 2 ;; *) 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