DNS

I tested this in my TinyDNS setup and worked great.

# verbose tinydns data file

#
# REVERSE ZONE
#
# (reverse) dns servers: primary and secondary
Z45.168.192.in-addr.arpa:ns.example.net:hostmaster.example.net::::::::

# NS records
&45.168.192.in-addr.arpa::ns.example.net:::
&45.168.192.in-addr.arpa::ns2.example.net:::

# MX handlers
@45.168.192.in-addr.arpa::relay.example.net:10
@45.168.192.in-addr.arpa::relay2.example.net:20

#
# FORWARD ZONE:
#
# SOA record: primary nameserver is ns.example.net and hostmaster
# mail address is hostmaster@example.net
# (the ‘Z’ configuration line is the only one that
# allows specifying the hostmaster mail address)
Zexample.net:ns.example.net:hostmaster.example.net::::::::

# NS records: primary and secondary nameservers
&example.net::ns.example.net:::
&example.net::ns2.example.net:::

# MX records: relay.example.net, distance = 10
# relay2.example.net, distance = 20
@example.net::relay.example.net:10
@example.net::relay2.example.net:20

# A records: ns.example.net, ns2.example.net
=ns.example.net:192.168.45.1:::
=ns2.example.net:192.168.45.2:::

# PTR records: relays are in the same hosts as dns servers
+relay.example.net:192.168.45.1:::
+relay2.example.net:192.168.45.2:::

# more A records: gateway.example.net
=gateway.example.net:192.168.45.254:::

# CNAME record: nscache.example.net is alias to gateway.example.net
Cnscache.example.net:gateway.example.net:::

#
# SUB DOMAIN DELEGATION
#

# NS record
&dmz.example.net::ns.dmz.example.net:::

# A/PTR record for nameserver
=ns.dmz.example.net:192.168.90.1:::

Running hylafax under daemontools

Sunday, 04 April 2010 01:02
There are no translations available.

Prerequisite: Debian 5.0, Hylafax 4.4.4

Activating faxq through daemontools

mkdir -p /var/service/
cd /var/service/
mkdir -m 1755 faxq
cd faxq
vim run

#!/bin/shexec 2>&1
echo “Starting faxq…”
exec /usr/sbin/faxq -D
# that’s all, folks!

chmod 755 run
mkdir -p -m 755 log
cd logwget -O run http://qmail.jms1.net/scripts/service-any-log-run
chmod 755 run
ln -s /var/service/faxq /service/
sleep 5
svstat /service/faxq /service/faxq/log

 

Activating hfaxd through daemontools

mkdir -p /var/service/
cd /var/service/
mkdir -m 1755 hfaxd
cd hfaxd
vim run

#!/bin/sh
exec 2>&1
echo “Starting hfaxd…”
exec /usr/sbin/hfaxd -d -i 4559
# that’s all, folks!

chmod 755 run
mkdir -p -m 755 log
cd log
wget -O run http://qmail.jms1.net/scripts/service-any-log-run
chmod 755 run
ln -s /var/service/hfaxd /service/
sleep 5
svstat /service/hfaxd /service/hfaxd/log

 

Activating faxgetty through daemontools

mkdir -p /var/service/
cd /var/service/
mkdir -m 1755 faxgetty
cd faxgetty
vim run

#!/bin/sh
exec 2>&1
echo “Starting faxgetty…”
exec /usr/sbin/faxgetty ttyS0
# that’s all, folks!

chmod 755 run
mkdir -p -m 755 log
cd log
wget -O run http://qmail.jms1.net/scripts/service-any-log-run
chmod 755 run
ln -s /var/service/faxgetty /service/
sleep 5
svstat /service/faxgetty /service/faxgetty/log

Note

Remember to turn off the hylafax in xinetd

sysv-rc-conf

tinydns and logwatch

There are no translations available.

 

This page is written to explain how to integrate logwatch and tinydns, a component of djbdns.

First, download the logwatch script to your server:

cd /usr/share/logwatch/scripts/services/
wget http://www.cypress-systems.net/scripts/tinydns
chmod 755 tinydns

Second, edit the script to tell logwatch where the logfile is looking for

vim /usr/share/logwatch/default.conf/services/tinydns.conf

Title = “tinydns”
LogFile = tinydns
# vi: shiftwidth=3 tabstop=3 et

 

Third, tell logwatch where the logs are exactly stored

vim /usr/share/logwatch/default.conf/logfiles/tinydns.conf

LogFile = /service/tinydns/log/main/@*.s
LogFile = /service/tinydns/log/main/current
# Keep only the lines in the proper date range…
*applytaidate
# vi: shiftwidth=3 tabstop=3 et

 

Four, run a test to see if there is any output

logwatch –service tinydns –range today –detail 10 –output stdout