if [ ! -f /opt/local/etc/ebnetd.conf ]; then cat < /opt/local/etc/ebnetd.conf ###################################################################### # Configuration file for ebnetd/ndtpd/ebhttpd. # (Copy this file to 'ebnetd.conf', and edit it.) ###################################################################### ### Port number 'ebnetd' binds. ### (default: ebnet) # ebnet-port ebnet ebnet-port 22010 ### Port number 'ndtpd' binds. ### (default: ndtp) # ndtp-port ndtp ndtp-port 2010 ### Port number 'ebhttpd' binds. ### (default: http) # http-port http http-port 8010 ### Owner of the server process. ### (default: none) #user ndtpuser user nobody ### Group of the server process. ### (default: none) #group ndtpgrp group nobody ### How many clients can be connected to the server at the same time. ### (default: 1) # max-clients 1 max-clients 0 ### Which hosts can or cannot connect to the server. ### (default: none) hosts 127.0.0.1 hosts ::1 hosts !? #hosts host.your.domain ### Timeout seconds until the server disconnects an idle connection. ### (default: 900) # timeout 900 ### Path to a working directory. ### Please create the directory and make it be writable for the server ### processes before executing the server. ### (default: /opt/local/var/ebnetd) # work-path /opt/local/var/ebnetd work-path /opt/local/var/ebnetd ### How many hit entries the server tries to find at a search. ### (default: 50) # max-hits 50 ### The maximum size of text the server may send as a response to ### a client. ### (default: 32768) # max-text-size 32768 ### Syslog facility ### (default: daemon) #syslog-facility local0 ### ### Book entry ### begin book ### Name of the book. ### (required) name jitenban ### Title of the book. ### (required) title ¥¢¥¹¥­¡¼ ¡Ø¼­¡¦Åµ¡¦Èס٠### Path to a top directory of the book. ### (required) #path /cdrom path /opt/local/share/E-books/ascii_jitenban/ ### Path to a top directory of the appdendix data of the book. ### (default: none) #appendix-path /opt/local/share/eb/appendix/jitenban97-2.1 ### How many clients can access the book at the same time. ### (default: 1) #max-clients 1 max-clients 0 ### Which hosts can or cannot access to the book. ### (default: none) hosts 127.0.0.1 hosts ::1 hosts !? #hosts host.your.domain end ### Add a book group directive (lines between 'begin book' and 'end'), ### if you want to read another CD-ROM book. A book group directive ### is required for each book. begin book name nec_books01 title »°¾ÊƲ ¡ØÆüËܸ켭ŵ¡¢±ÑÏ¡¦Ï±Ѽ­Åµ¡Ù path /opt/local/share/E-books/nec_books01/ max-clients 0 hosts 127.0.0.1 hosts ::1 hosts !? end begin book name genius title Â罤´Û½ñŹ ¡Ø¥¸¡¼¥Ë¥¢¥¹±Ñϼ­Åµ¡Ù path /opt/local/share/E-books/genius/ max-clients 0 hosts 127.0.0.1 hosts ::1 hosts !? end begin book name ebx1100 title »°¾ÊƲ ¡Ø¼­½ñ½½´¬¡Ù path /opt/local/share/E-books/ebx1100/ max-clients 0 hosts 127.0.0.1 hosts ::1 hosts !? end EOF fi if [ -d /opt/local/var/ebnetd ]; then chown nobody /opt/local/var/ebnetd chgrp nobody /opt/local/var/ebnetd fi if false; then if [ ! -f /Library/LaunchDaemons/ebnet.plist ]; then cat < /Library/LaunchDaemons/ebnet.plist Disabled InitGroups Label ebnet ProgramArguments /opt/local/sbin/ebnetd -i Sockets Listener SockServiceName 22010 SockType stream UserName nobody inetdCompatibility Wait LimitLoadToHosts 127.0.0.1::1 192.168.0.0/24219.166.94.168/29 192.168.1.0/24210.154.62.64/29 EOF fi if [ ! -f /Library/LaunchDaemons/ndtp.plist ]; then cat < /Library/LaunchDaemons/ndtp.plist Disabled InitGroups Label ndtp ProgramArguments /opt/local/sbin/ndtpd -i Sockets Listener SockServiceName 2010 SockType stream UserName nobody inetdCompatibility Wait LimitLoadToHosts 127.0.0.1::1 192.168.0.0/24219.166.94.168/29 192.168.1.0/24210.154.62.64/29 EOF fi if [ ! -f /Library/LaunchDaemons/ebhttp.plist ]; then cat < /Library/LaunchDaemons/ebhttp.plist Disabled InitGroups Label ebhttp ProgramArguments /opt/local/sbin/ebhttpd -i Sockets Listener SockServiceName 8010 SockType stream UserName nobody inetdCompatibility Wait LimitLoadToHosts 127.0.0.1::1 192.168.0.0/24219.166.94.168/29 192.168.1.0/24210.154.62.64/29 EOF fi #launchctl load -w /Library/LaunchDaemons/ebnet.plist #launchctl load -w /Library/LaunchDaemons/ndtp.plist #launchctl load -w /Library/LaunchDaemons/ebhttp.plist else [ ! -d /Library/StartupItems/ebnetServer ] && \ mkdir /Library/StartupItems/ebnetServer if [ ! -f /Library/StartupItems/ebnetServer/ebnetServer ]; then cat < /Library/StartupItems/ebnetServer/ebnetServer #!/bin/sh ## # ebnet Server ## . /etc/rc.common StartService () { /opt/local/sbin/ebnetd } StopService () { /opt/local/sbin/ebncontrol terminate || /opt/local/sbin/ebncontrol kill } RestartService () { /opt/local/sbin/ebncontrol restart || { StopService; StartService; } } RunService "\$1" EOF chmod +x /Library/StartupItems/ebnetServer/ebnetServer fi if [ ! -f /Library/StartupItems/ebnetServer/StartupParameters.plist ]; then cat < /Library/StartupItems/ebnetServer/StartupParameters.plist { Description = "ebnet Server"; Provides = ("ebnet Server"); } EOF fi [ ! -d /Library/StartupItems/ndtpServer ] && \ mkdir /Library/StartupItems/ndtpServer if [ ! -f /Library/StartupItems/ndtpServer/ndtpServer ]; then cat < /Library/StartupItems/ndtpServer/ndtpServer #!/bin/sh ## # ndtp Server ## . /etc/rc.common StartService () { /opt/local/sbin/ndtpd } StopService () { /opt/local/sbin/ndtpcontrol terminate || /opt/local/sbin/ndtpcontrol kill } RestartService () { /opt/local/sbin/ndtpcontrol restart || { StopService; StartService; } } RunService "\$1" EOF chmod +x /Library/StartupItems/ndtpServer/ndtpServer fi if [ ! -f /Library/StartupItems/ndtpServer/StartupParameters.plist ]; then cat < /Library/StartupItems/ndtpServer/StartupParameters.plist { Description = "ndtp Server"; Provides = ("ndtp Server"); } EOF fi [ ! -d /Library/StartupItems/ebhttpServer ] && \ mkdir /Library/StartupItems/ebhttpServer if [ ! -f /Library/StartupItems/ebhttpServer/ebhttpServer ]; then cat < /Library/StartupItems/ebhttpServer/ebhttpServer #!/bin/sh ## # ebhttp Server ## . /etc/rc.common StartService () { /opt/local/sbin/ebhttpd } StopService () { /opt/local/sbin/ebhtcontrol terminate || /opt/local/sbin/ebhtcontrol kill } RestartService () { /opt/local/sbin/ebhtcontrol restart || { StopService; StartService; } } RunService "\$1" EOF chmod +x /Library/StartupItems/ebhttpServer/ebhttpServer fi if [ ! -f /Library/StartupItems/ebhttpServer/StartupParameters.plist ]; then cat < /Library/StartupItems/ebhttpServer/StartupParameters.plist { Description = "ebhttp Server"; Provides = ("ebhttp Server"); } EOF fi #/Library/StartupItems/ebnetServer/ebnetServer start #/Library/StartupItems/ndtpServer/ndtpServer start #/Library/StartupItems/ebhttpServer/ebhttpServer start fi