Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Automatically start FileMaker Pro Server (5.5) OS X Server

I just moved FileMaker Server from a MacOS 9 box, to a new server (XServe... very nice), and was surprized that there was no provision for automatically starting the FMP Server at boot-up, so I rolled my own using a StartupItem.

Read the rest of the hint for the how-to...



  1. First you have to create a folder in the proper place. I chose to create the folder /Library -> StartupItems -> FileMaker. The /Library -> StartupItems enclosing folder might not exist on your system; if it doesn't, just create it.

  2. You will need a file in this folder named StartupParameters.plist. Mine looks like this:
    {
      Description   = "FileMaker Server";
      Provides      = ("FileMaker Databases");
      Requires      = ("Resolver");
      Uses          = ("Network Time");
      Preference    = "None";
      Messages =
      {
        start = "Starting FileMaker Server";
        stop  = "Stopping FileMaker Server";
        restart  = "Restarting FileMaker Server";
      };
    }
  3. You will also need another file named FileMaker in this folder. This one has some long lines, and in my file they are not broken, so you might want to do some editing. You will also need to give the script an appropriate user to run FileMaker Pro as. I would recomend not using the root user, both for security reasons and because the GUI tool provided by FileMaker does not seem to work. I am running it as my admin login. Also, I am putting in the path as it is on my system; if you have FileMaker installed somewhere else, you will need to adjust it:
    
    #!/bin/bash
    
    . /etc/rc.common
    
    FMSLOCATION='/Applications/FileMaker Server 5.5/FileMaker Server Config.app/Contents/Resources'
    SERVERUSER='admin'
    
    StartService ()
    {
      ConsoleMessage "Starting FileMaker Server"
      sudo -u $SERVERUSER "$FMSLOCATION"/fmserverd START -c "$FMSLOCATION"/fmserver.conf
    }
    
    StopService ()
    {
      ConsoleMessage "Stopping FileMaker Server"
      sudo -u $SERVERUSER "$FMSLOCATION"/fmserverd STOP
      killall -1 fmserverd 2> /dev/null
    }
    
    RestartService ()
    {
      ConsoleMessage "Restarting FileMaker Server"
      sudo -u $SERVERUSER "$FMSLOCATION"/fmserverd STOP
      sudo -u $SERVERUSER "$FMSLOCATION"/fmserverd START -c "$FMSLOCATION"/fmserver.conf
    }
    
    RunService "$1"
    
  4. Now you will need to make sure that the permissions are correct on all of the items. At the command line type:
    sudo chmod -r 755 /Library/StartupItems/FileMaker
    Provide your password when asked.
Now FileMaker Server will start and stop itself whenever you start or shutdown the computer. To test your script, just type:
sudo /Lilbrary/StartupItems/FileMaker/FileMaker start
To test stopping the server, just replace start in the above command with stop.
    •    
  • Currently 2.00 / 5
  You rated: 5 / 5 (7 votes cast)
 
[17,300 views]  

Automatically start FileMaker Pro Server (5.5) | 7 comments | Create New Account
Click here to return to the 'Automatically start FileMaker Pro Server (5.5)' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Automatically start FileMaker Pro Server (5.5)
Authored by: aaronfreimark on Jan 05, '04 09:56:59AM

Great script. The example on Filemaker's web site is incomplete--since it runs the daemon as root it is not controllable from the Config application. This script runs the daemon as a user (admin), so things work well.



[ Reply to This | # ]
Two Things
Authored by: jdera on Jan 05, '04 10:11:46AM

1) This is a redundant hint: http://www.macosxhints.com/article.php?story=20011106164127927&query=FileMaker+Server

2) Instead of having your restart function call the FileMaker application direclty, you could have done

RestartService ()
{
StopService
StartService
}

A little cleaner looking ;)



[ Reply to This | # ]
Two Things
Authored by: larkost on Jan 05, '04 10:34:01AM

1) I didn't like the old one... no stop or restart, and it ran things as root... bad idea in my opinion for multiple reasons.

2) I specifically didn't want to do things this way so that the console messages were clear.



[ Reply to This | # ]
Two Things
Authored by: jdera on Jan 05, '04 10:38:46AM

1) Ah, yes, but if you dig through the comments, you'll find a script that is essentially the same as yours. Two major differences being that it allows for a setting in /etc/hostconfig to enable/disable the service and it uses su instead of sudo. I'd vote slightly more functional, but negligible in the long run. Still, two hints on the site now refer to starting FMS at boot. Redundancy continues.

2) Fair enough.



[ Reply to This | # ]
bad idea...
Authored by: Krioni on Jan 05, '04 03:17:46PM

This is a bad idea, unless you know that the machine shut down properly. If FileMaker Server (or the host machine) crashed, restarting with the files that were open during the crash can lead to corruption that is not repaired. FileMaker is supposed to do a Consistency check, and does, but I have seen (as have many others) damage that remains hidden a for a long time, eventually making your files (and all that programming) unusable. Any script that starts up FileMaker Server automatically should also grab the most recent backups of the files, and host those instead.



[ Reply to This | # ]
Automatically start FileMaker Pro Server (5.5)
Authored by: MadMarky on Jan 06, '04 01:27:22AM

Running FM Server 5.5 on a XServe machine strikes me as a somewhat odd thing to be doing. We happily use a SilverDoor G4 for our FM Pro Server and leave the serious processing to our XServe.

I originally intended to install FMP Server on my XServe, but was told by Apple Tech Support that doing so was a real waste of the XServe's potential. Also, FMP Server simply runs better under a standard configuration (non server) machine.

And on a non-server machine, getting it to autostart is not nearly as complex as your 'workaround' (which admittedly is brilliant, if a bit unnecessary in my humble opinion.)

Just my thoughts...

MadMarky in Beverly Hills



[ Reply to This | # ]
Automatically start FileMaker Pro Server (5.5)
Authored by: Anonymous on Feb 09, '04 10:59:22PM

does anyone know if you can do this with Mac OS X native gui apps?

i've only seen examples with command line apps.



[ Reply to This | # ]