daemontools ã®Ubuntuã¸ã®ã¤ã³ã¹ãã¼ã«
inittabãã¡ã¤ã«ãä½ã£ã¦ããã
inittabããªãã¨ã¨ã©ã¼ã«ãªãã®ã§ããã§ãå®éã«ã¯ä½¿ããªããæè¿ã®ãã£ã¹ããªãã¥ã¼ã·ã§ã³ã§ã¯inittabã¯ä½¿ããªãã®ã§ãäºæç¨ããã¼ãç¨æã
sudo touch /etc/inittab
aptã§daemontoolsãã¤ã³ã¹ãã¼ã«ããã
sudo aptitude install svtools
upstartã使ãã®ã§inittabã¯åé¤ãã¨ã
sudo rm /etc/inittab
upstartç¨ã«ãã¡ã¤ã«ãä½ãã
sudo vim /etc/event.d/svscanboot
/etc/event.d/svscanbootãã¡ã¤ã«å 容
1 # svscanboot 2 3 start on runlevel 2 4 start on runlevel 3 5 start on runlevel 4 6 start on runlevel 5 7 8 stop on shutdown 9 10 respawn 11 exec svscanboot
åèµ·åããã
shutdown -r 0
åèµ·åããããªãæã¯ãæåã§èµ·åããã
sudo initctl start svscanboot
SVSCANãèµ·åãã¦ãããã¨ã確èª
takuya@server:/var/www/$ ps aux | grep sv takuya 20390 0.0 0.0 2812 768 pts/5 R+ 18:45 0:00 grep sv root 30953 0.0 0.0 1772 496 ? Ss 18:25 0:00 /bin/sh /usr/bin/svscanboot root 30955 0.0 0.0 1736 368 ? S 18:25 0:00 svscan /etc/service
/etc/serviceã«Daemonãä½ã
ln -s /var/spider /etc/service
ãã¨ã¯å®æçã«ç¢ºèª
ãã°ã¯Multiãã°ã使ããã/var/spider/log/runãä½ã£ã¦ããã¨è¯ãã