[Home] [Kuri] [Sysad] [Internet?] [Blog] [Java] [Windows] [Download] [Profile] [Flash] [+] |
OS: | FreeBSD-4.1R (しかも VMware 上…) |
source: | daemontools-0.70.tar.gz |
ports: | ucspi-tcp-0.88 |
% tar xfz daemontools-0.70.tar.gz % cd daemonntools-0.70 % make % su # make setup check # mkdir /usr/local/service # chmod 755 /usr/local/service |
#!/bin/sh PATH="/usr/local/bin:/usr/sbin:/usr/bin" export PATH case $1 in start) /usr/local/bin/svscan /usr/local/service & ;; stop) # TE-NU-KI- ;; *) echo "Usage: $0 {start|stop}" esac |
# mkdir -p /usr/local/etc/tcpserver/telnetd /usr/local/etc/tcpserver/telnetd/run を作成 # ln -s /usr/local/etc/tcpserver/telnetd /usr/local/service |
#!/bin/sh /usr/local/bin/tcpserver -vRH -c 2 \ 0 telnet /usr/libexec/telnetd 2>&1 |
# rm /usr/local/service/telnetd # kill telnetdを見てるsuperviseのPID # kill tcpserverのPID |
# cd /usr/local/etc/tcpserver/telnetd # chmod u+t . # mkdir -p log/main # touch log/status log/run の作成 |
#!/bin/sh multilog t ./main |
@400000003b48e0fd2840310c tcpserver: status: 0/2 @400000003b48e117034d67d4 tcpserver: status: 1/2 @400000003b48e11705ca8564 tcpserver: pid 28174 from 192.168.0.211 @400000003b48e11733dfda94 tcpserver: ok 28174 s.in.usupi.org:192.168... @400000003b48e11930dc3f54 tcpserver: end 28174 status 256 @400000003b48e1193103e3c4 tcpserver: status: 0/2 |
# tai64nlocal < log/main/current 2001-07-09 07:38:43.675295500 tcpserver: status: 0/2 2001-07-09 07:39:09.055404500 tcpserver: status: 1/2 2001-07-09 07:39:09.097158500 tcpserver: pid 28174 from 192.168.0.211 2001-07-09 07:39:09.870308500 tcpserver: ok 28174 s.in.usupi.org:... 2001-07-09 07:39:11.819740500 tcpserver: end 28174 status 256 2001-07-09 07:39:11.822338500 tcpserver: status: 0/2 |
# mkdir /usr/local/etc/tcpserver/rules # cd /usr/local/etc/tcpserver/rules telnet.txt の作成 # tcprules telnet.cdb telnet.tmp < telnet.txt |
192.168.0.:allow 127.:allow :deny |
.SUFFIXES: .txt .cdb .txt.cdb: tcprules $@ $<.tmp < $< |
% cat telnetd/run #!/bin/sh /usr/local/bin/tcpserver -vRH -c 2 \ -x /usr/local/etc/tcpserver/rules/tcp.telnet.cdb \ 0 telnet /usr/libexec/telnetd 2>&1 |
svc -d /usr/local/service/ほげほげ |
svc -u /usr/local/service/ほげほげ |
[Home] [Kuri] [Sysad] [Internet?] [Blog] [Java] [Windows] [Download] [Profile] [Flash] [-] | |
usu@usupi.org | Last modified : Mon Sep 30 12:19:54 2019 |