Listing 9. qturn.run
#!/bin/sh
# file qturn.run
# for /var/qmail/qturn/service/run
# djb daemontools runscript for qturn server invocation
# wcm, 2001.12.24 - 2001.12.24
# ===
# Installation in brief:
#
# 1. create user "qturn", member of group "nofiles",
# home directory /var/qmail/qturn
#
# 2. mkdir /var/qmail/qturn
# 3. chown qturn:qmail /var/qmail/qturn
# 4. chmod 2755 /var/qmail/qturn
#
# 5. create daemontools service directories:
#
# mkdir -p /var/qmail/qturn/service/log
# chmod +t /var/qmail/qturn/service/
#
# 6. create log directory:
#
# mkdir -p /var/log/qmail/qturn
#
# 7. install this run script into /var/qmail/qturn/service/run
# 8. chmod 755 /var/qmail/qturn/service/run
# 9. install logger run script (see qturn_log.run)
# 10. install qturnd.sh in /var/qmail/qturn/bin (see qturnd.sh)
# 11. link qturn service directory into /service:
#
# ln -s /var/qmail/qturn/service /service/qturn
#
# 12. modify /var/qmail/bin/qmailctl script to include this
# service
#
QTURNUID=`id -u qturn`
QTURNGID=`id -g qturn`
/usr/local/bin/tcpserver -RHl0 -u "$QTURNUID" -g "$QTURNGID" -- \
0 55210 /var/qmail/qturn/bin/qturnd.sh 2>&1
# end file qturn.run
Copyright © 1994 - 2018 Linux Journal. All rights reserved.