Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 7275 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

I need to AppleScript the closing of served files when the power fails. My power supply can trigger an AppleScript which can call a Terminal shell script that can close the files, to allow an elegant shut down when needed. I can do all but the last step, I have no UNIX training and wonder if anyone else has done this to help me along.

  • 4 weeks later...
  • Newbies
Posted

#!/bin/sh

/usr/bin/fmsadmin stop

the above run as a shell script will shutdown the databases (giving clients 30 seconds to disconnect, by default) and stop the server.

if you need other options (messages to clients, more/less time before disconnect, etc.) type

fmsadmin HELP stop

at the command line on your server.

just put the two lines at the top in a text editor (make sure it's text only, not RTF or something), such as vi or BBEdit. call it somethign like shutdown.sh, then, at the command line, do:

chmod +x shutdown.sh

to make it executable

if you need to make it a double-clickable type file (I'm not sure how applescript works and what it needs), call it shutdown.command, then do a command-i (get info) on the file, check hide extension if you want, and change Open with: to Terminal.

-rich

This topic is 7275 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.