The Largest Repository of ColdFusion Knowledge in The World for More Than 12 Years

ColdFusion on Ulitzer

Subscribe to ColdFusion on Ulitzer: eMailAlertsEmail Alerts newslettersWeekly Newsletters
Get ColdFusion on Ulitzer: homepageHomepage mobileMobile rssRSS facebookFacebook twitterTwitter linkedinLinkedIn


CFDJ Authors: AppDynamics Blog, Michael Kopp, Tad Anderson, Bob Gourley, Jayaram Krishnaswamy

Related Topics: ColdFusion on Ulitzer, MultiTouch Developer Journal, CMS Journal, Ubuntu Linux Journal, Macintosh Magazine

CFDJ: RSS Feed Item

Problems with configuring CF801 on Mac for System Startup

Two problems with configuring ColdFusion 8.01 on Mac OS X for startup on system boot when using the the utility {cf_root}/bin/cf-init.sh. The first issue is that cf-init.sh cannot be used again to configure CF for startup on boot after the cf-init.sh script is used to unconfigure the service. The second issue is that for Multiserver configuration the script cf-init.sh cannot be used to unconfigure CF as a startup service and the items under /Library/StartupItems/ColdFusion8Multi must be removed manually. The ColdFusion Engineering team is actively seeking to correct these issues, but I'm posting for your convenience in case you run into this beforehand. Issue 1 logged as ColdFusion bug 73548 On Mac, running cf-init.sh to install system startup script cannot be done a second time after running cf-init.sh uninstall. The cf-init.sh function install_mac() permanently moves the file {cf_root}/bin/cf-standalone-startup to /Library/StartupItems/ under the new name ColdFusion8 as shown here: mv -f $CF_DIR/bin/cf-standalone-startup /Library/StartupItems/ColdFusion8/ColdFusion8 Then the uninstall_mac() function in cf-init.sh permanently removes that file ColdFusion8 as shown here: rm -rf /Library/StartupItems/ColdFusion8 There are no longer any copies of {cf_root}/bin/cf-standalone-startup under any name on the system, so another attempt to configure ColdFusion to start on System Boot cannot be performed. More details: 1) Install CF801 on Mac, but do NOT choose option to start on system boot at this time 2) Run cf-init.sh install, then cf-init.sh uninstall, then again cf-init.sh install 3) Observe second usage of cf-init.sh fails ----------------------------- * Initial directory listing after installing without option to start on boot * Notice StartupParameters.plist and cf-standalone-startup are present ----------------------------- my-powerbook:/opt/ColdFusion8/bin cfqauser$ ls -l total 4296 -rwxr-xr-x 1 cfqauser admin 504 Nov 6 10:13 SMSClient.sh -rwxrwxr-x 1 cfqauser admin 260 Jan 19 2008 StartupParameters.plist -rwxr-xr-x 1 cfqauser admin 7241 Nov 6 10:13 cf-init.sh -rwxrwxr-x 1 cfqauser admin 409 Nov 6 10:13 cf-standalone-startup -rwxr-xr-x 1 cfqauser admin 6671 Nov 6 10:13 cfcompile.sh -rwxr-xr-x 1 cfqauser admin 1501420 Jan 19 2008 cfencode.exe -rwxr-xr-x 1 cfqauser admin 110264 Jan 19 2008 cfencode.linux -rwxr-xr-x 1 cfqauser admin 527624 Jan 19 2008 cfencode.solaris -rwxr-xr-x 1 cfqauser admin 252 Nov 6 10:13 cfinfo -rwxr-xr-x 1 cfqauser admin 414 Nov 6 10:13 cfscan.sh -rwxr-xr-x 1 cfqauser admin 265 Nov 6 10:13 cfstat -rwxr-xr-x 1 cfqauser admin 7025 Nov 6 10:13 coldfusion drwxr-xr-x 7 cfqauser admin 238 Nov 6 10:13 connectors -rwxr-xr-x 1 cfqauser admin 860 Jan 23 2008 findjava.sh lrwxr-xr-x 1 cfqauser admin 39 Nov 6 10:13 jvm.config -> /opt/ColdFusion8/runtime/bin/jvm.config ----------------------------- * Run cf-init.sh to install startup service * Notice cf-standalone-startup is not in bin/ directory listing ----------------------------- my-powerbook:/opt/ColdFusion8/bin cfqauser$ sudo ./cf-init.sh install Password: Creating the Coldfusion 8 start script /Library/StartupItems/ColdFusion8/ColdFusion8 Install complete my-powerbook:/opt/ColdFusion8/bin cfqauser$ ls /Library/StartupItems/ColdFusion8/ ColdFusion8 StartupParameters.plist my-powerbook:/opt/ColdFusion8/bin cfqauser$ ls -l total 4288 -rwxr-xr-x 1 cfqauser admin 504 Nov 6 10:13 SMSClient.sh -rwxrwxr-x 1 cfqauser admin 260 Jan 19 2008 StartupParameters.plist -rwxr-xr-x 1 cfqauser admin 7241 Nov 6 10:13 cf-init.sh -rwxr-xr-x 1 cfqauser admin 6671 Nov 6 10:13 cfcompile.sh -rwxr-xr-x 1 cfqauser admin 1501420 Jan 19 2008 cfencode.exe -rwxr-xr-x 1 cfqauser admin 110264 Jan 19 2008 cfencode.linux -rwxr-xr-x 1 cfqauser admin 527624 Jan 19 2008 cfencode.solaris -rwxr-xr-x 1 cfqauser admin 252 Nov 6 10:13 cfinfo -rwxr-xr-x 1 cfqauser admin 414 Nov 6 10:13 cfscan.sh -rwxr-xr-x 1 cfqauser admin 265 Nov 6 10:13 cfstat -rwxr-xr-x 1 cfqauser admin 7025 Nov 6 10:13 coldfusion drwxr-xr-x 7 cfqauser admin 238 Nov 6 10:13 connectors -rwxr-xr-x 1 cfqauser admin 860 Jan 23 2008 findjava.sh lrwxr-xr-x 1 cfqauser admin 39 Nov 6 10:13 jvm.config -> /opt/ColdFusion8/runtime/bin/jvm.config ----------------------------- * Uninstall startup service with cf-init.sh ----------------------------- my-powerbook:/opt/ColdFusion8/bin cfqauser$ sudo ./cf-init.sh uninstall Uninstall complete my-powerbook:/opt/ColdFusion8/bin cfqauser$ ls /Library/StartupItems/ColdFusion8/ ls: /Library/StartupItems/ColdFusion8/: No such file or directory ----------------------------- * Again, run cf-init.sh to re-install startup service * Notice failure on mv cf-standalone-startup to /Library/StartupItems ----------------------------- my-powerbook:/opt/ColdFusion8/bin cfqauser$ sudo ./cf-init.sh install Creating the Coldfusion 8 start script /Library/StartupItems/ColdFusion8/ColdFusion8 mv: rename /opt/ColdFusion8/bin/cf-standalone-startup to /Library/StartupItems/ColdFusion8/ColdFusion8: No such file or directory Install complete my-powerbook:/opt/ColdFusion8/bin cfqauser$ ls /Library/StartupItems/ColdFusion8/ StartupParameters.plist my-powerbook:/opt/ColdFusion8/bin cfqauser$ Issue 2 logged as bug ColdFusion 73178 The cf-init.sh function for install_mac() has a section for server configuration and a section for multiserver config, but the uninstall_mac () function only has a Server Config section looking for /Library/StartupItems/ColdFusion8, but not a Multiserver section to remove /Library/StartupItems/ColdFusion8Multi. Notice that there is an option to configure CF for system startup with "Standalone" (a.k.a. Server Config) and an option for Multiserver Config. install_mac() { if [ -f /Library/StartupItems/ColdFusion8 ]; then echo "Coldfusion 8 appears to already be set up to start on boot" exit 2 fi if [ "$MULTI_SERVER" = "false" ]; then echo "Creating the Coldfusion 8 start script /Library/StartupItems/ColdFusion8/ColdFusion8" mkdir /Library/StartupItems/ColdFusion8 mv -f $CF_DIR/bin/cf-standalone-startup /Library/StartupItems/ColdFusion8/ColdFusion8 cp -f $CF_DIR/bin/StartupParameters.plist /Library/StartupItems/ColdFusion8/StartupParameters.plist chmod 544 /Library/StartupItems/ColdFusion8/* chown root:wheel /Library/StartupItems/ColdFusion8/* else echo "Creating the Coldfusion 8 Multi-server start script /Library/StartupItems/ColdFusion8Multi/ColdFusion8Multi" mkdir /Library/StartupItems/ColdFusion8Multi mv -f $CF_DIR/bin/cf-multi-startup /Library/StartupItems/ColdFusion8Multi/ColdFusion8Multi cp -f $CF_DIR/bin/StartupParameters.plist /Library/StartupItems/ColdFusion8Multi/StartupParameters.plist chmod 544 /Library/StartupItems/ColdFusion8Multi/* chown root:wheel /Library/StartupItems/ColdFusion8Multi/* fi echo "Install complete" } Notice that there is no option to remove ColdFusion8Multi from /Library/StartupItems uninstall_mac() { if [ -f /Library/StartupItems/ColdFusion8 ]; then echo "Coldfusion 8 does not appear to be added to your init system" exit 2 fi rm -rf /Library/StartupItems/ColdFusion8 echo "Uninstall complete" }

Read the original blog entry...