Archive

Posts Tagged ‘daemontools’

daemontools の怪

自宅の Linux マシンにて、なんか svstat の様子がおかしい。以下コピペ。

# svstat /service/*
/service/apache: down 1848361 seconds
/service/dnscachex: up (pid 621) 111175402 seconds
/service/httpd: up (pid 18371) 1849581 seconds
/service/miniUpdate: up (pid 630) 111175402 seconds
/service/pgpool: up (pid 24664) 393643 seconds
/service/pop3d: up (pid 633) 111175402 seconds
/service/qmail: up (pid 625) 111175402 seconds
/service/smtpd: up (pid 628) 111175402 seconds
/service/tinydns: up (pid 623) 111175402 seconds

111175402秒って 1286日なんですが?
この家には2年も住んでいませんよ?
一番上の apache の 1848361秒 ≒ 21日ってのは合ってるんですが。

Apache を daemontools で管理

Apache 2.0 を daemontools で管理しようとしたら、httpd -h でヘルプを見ても -F オプションが無い。どうやら廃止されたようです。

とりえあずググったら割とすぐ見つかりました。

— Apache 1.3.x
$ cat /service/apache1/run
#!/bin/sh
exec 2>&1
exec env - PATH='/usr/local/apache1/bin' \
httpd -F

— Apache 2.0.x
$ cat /service/apache2/run
#!/bin/sh
exec 2>&1
exec env - PATH='/usr/local/apache2/bin' \
httpd -DNO_DETACH