if false; then if [ ! -f /System/Library/LaunchDaemons/org.freewnn.jserver.plist ]; then cat < /System/Library/LaunchDaemons/org.freewnn.jserver.plist Disabled Label org.freewnn.jserver OnDemand Program /opt/local/bin/Wnn4/jserver ProgramArguments jserver ServiceIPC EOF fi #launchctl load -w /System/Library/LaunchDaemons/org.freewnn.jserver.plist else [ ! -d /System/Library/StartupItems/FreeWnnJServer ] && \ mkdir /System/Library/StartupItems/FreeWnnJServer if [ ! -f /System/Library/StartupItems/FreeWnnJServer/FreeWnnJServer ]; then cat < /System/Library/StartupItems/FreeWnnJServer/FreeWnnJServer #!/bin/sh ## # FreeWnn JServer ## . /etc/rc.common StartService () { /opt/local/bin/Wnn4/jserver } StopService () { /opt/local/bin/Wnn4/wnnkill localhost } RestartService () { StopService; StartService; } RunService "\$1" EOF chmod +x /System/Library/StartupItems/FreeWnnJServer/FreeWnnJServer fi if [ ! -f /System/Library/StartupItems/FreeWnnJServer/StartupParameters.plist ]; then cat < /System/Library/StartupItems/FreeWnnJServer/StartupParameters.plist { Description = "FreeWnn JServer"; Provides = ("FreeWnn JServer"); } EOF fi #/System/Library/StartupItems/FreeWnnJServer/FreeWnnJServer start fi