dkemme Posted December 1, 2004 Posted December 1, 2004 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.
Newbies Sheaferm Posted December 23, 2004 Newbies Posted December 23, 2004 #!/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
Recommended Posts
This topic is 7647 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 accountSign in
Already have an account? Sign in here.
Sign In Now