AnsweredAssumed Answered

Server Side Script To Close A DB

Question asked by john__j on May 6, 2014
Latest reply on May 13, 2014 by wimdecorte

Can anyone provide a valid example of a shell script that leverages the "fmsadmin" command to close a database and that can be successfully executed through a server schedule?

 

The following is the code I'm trying to use to achieve this task:

 

#!/bin/bash

#

sudo fmsadmin close -y mydatabase.fmp12

exit 0

 

I've tried running this with the default "fmserver" account and with the server's admin account and both yield unsuccessful results. If I run the scheduled script with the server's admin account I get a Aborted By User error. If I run it with the default fmserver account, the script looks to execute successfully but the database does not actuall close. I've propogated the permissions of Scripts folder down to my custom script and have edited the sudoers file as mentioned in the FileMaker Server documentation.

 

I'd love to hear the specifics in how some of you are achieving such a task on your server(s).

Outcomes