Archives

All posts for the day October 18th, 2011

Running openvpn under daemontools

Sunday, 21 March 2010 21:03
There are no translations available.

 

Prerequisite: Debian 5.0, openvpn

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

#!/bin/sh
exec 2>&1
exec /usr/sbin/openvpn –writepid /var/run/openvpn.server.pid \
–cd /etc/openvpn –config /etc/openvpn/server.conf –log /dev/stderr

chmod 755 run
mkdir -m 755 log
cd log
wget -O run http://qmail.jms1.net/scripts/service-any-log-run
chmod 755 run/etc/init.d/openvpn stop

ln -s /var/service/openvpn /service/openvpn
sleep 5

svstat /service/openvpn/ /service/openvpn/log/

Running backuppc under daemontools

Sunday, 21 March 2010 21:08
There are no translations available.

 

Prerequisite: Debian 5.0, backuppc

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

#!/bin/sh
exec 2>&1
echo “*** Starting backuppc…”
exec setuidgid backuppc /usr/share/backuppc/bin/BackupPC

chmod 755 run
mkdir -m 755 logcd log
wget -O run http://qmail.jms1.net/scripts/service-any-log-run
chmod 755 run
/etc/init.d/backuppc stop

ln -s /var/service/backuppc /service/backuppc
sleep 5

svstat /service/backuppc/ /service/backuppc/log/

dnscache ang logwatch

There are no translations available.

 

This page is written to explain how to integrate logwatch and dnscache, 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/dnscache
chmod 755 dnscache

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

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

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

 

Third, tell logwatch where the logs are exactly stored

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

LogFile = /service/dnscache/log/main/@*.s
LogFile = /service/dnscache/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 dnscache –range today –detail 10 –output stdout

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