I run FileMaker Server 8 Advanced on OS X Server 10.4 with Web Publishing Engine, SSL, iTools and Timbuktu. Another computer runs a FileMaker client that periodically checks the status of data on the server and kicks off a script or not, depending on what it finds. I’m trying to write a sscript that will re-start the server if the status check doesn’t execute properly - so the server will either report per the status check, or re-start if it doesn’t report.
If I use Applescript to tell the Finder to re-start:
tell application “Finder” of machine “eppc://192.168.0.2”
restart
end tell
It re-starts, but with two problems:
It asks for a user name and password for authentication -this has to run unattended.
The machine won’t have the Finder loaded - it will be sitting there with the login window up.
The login window alows the user to re-start without authentication, so I tried:
tell application “System Events” of machine “eppc://192.168.0.2”
Result: Application isn’t running
So I tried it without reference to an application:
tell “System Events” of machine “eppc://192.168.0.2”
Result: Can’t get “System events” of machine “eppc://192.168.0.2”. Access not allowed.
I’ve also tried using osascript, but I can’t work out how to combine that with eppc.
I would be delighted if anyone could give me some help on how to re-start a remote machine from the login window and with any authorisation necessary in the script.
Colin