Bailey Kessing Posted December 3, 2014 Posted December 3, 2014 Is it possible to have ScriptMaster execute a shell script sever-side using the “Perform Script on Server” and the module "RunShellScript( command ; waitForOutput ; timeout )” that is in ScriptMaster’s example file?
ggt667 Posted December 4, 2014 Posted December 4, 2014 You can do this in regular FileMaker Server Admin Schedules.
Bailey Kessing Posted December 10, 2014 Author Posted December 10, 2014 Yes, but with ScriptMaster I could trigger such an execution…which is what I want. So does anyone know if it works?
john renfrew Posted December 12, 2014 Posted December 12, 2014 isn't the problem knowing if it has run??
Bailey Kessing Posted December 13, 2014 Author Posted December 13, 2014 LOL. Perhaps. We have been testing trying to get a script to run (simple file creation) and having difficulties. Actually we get a “ERROR” returned every time. But we could be running it in the wrong place or trying to do it without the proper permissions or such. Can’t say I am an expert so would love to know that “yes it is possible but I am doing something wrong” or “No, can’t run that way”.
David Jondreau Posted December 15, 2014 Posted December 15, 2014 Do you have the plug-in installed on the server?
evanseeds Posted December 17, 2014 Posted December 17, 2014 "ERROR" is a response from our plugin indicating that it has hit some sort of Java error. If you call the LastError function (SMLastError, or XXLastError if you're using a generated plugin, where XX is your custom prefix), you'll get a more detailed error message, which would help us figure out exactly why you're getting this.
Bailey Kessing Posted December 20, 2014 Author Posted December 20, 2014 Yes to running it on the server and having it installed there. We are close. Have been able to create a file and such so the short answer is “Yes” we can do it. We are trying to fun some R programs this way and still having some issues but we will get there I think. I will report back more info as we get further along but thanks everyone for their support.
Jonathan Perel Posted January 30, 2015 Posted January 30, 2015 Its totally possible to do that. However, you have to make sure that the "fmserver" user has a login shell selected. I think by default the user's login shell is set to none. To set the login shell, use workgroup manager or the User pref pane (control-click on the user name to get the advanced options menu). I'd recommend using the bash shell. A fun trick is to perform commands on other servers directly through SSH. Create a private and public openssl key, put the public key on the server you want to send commands to (in the user's ~/.ssh/authorized_keys file) and then you use the private key establish the connection from your FileMaker script. Here's the link to the ScriptMaster script to send SSH commands directly from FMP. http://fmforums.com/forum/topic/90891-executing-ssh-commands/ Just provide a hostname, user name on the host, private key, and a shell command, and it uses the JP
Bailey Kessing Posted February 1, 2015 Author Posted February 1, 2015 Thanks! We will report back. Been traveling for a while!
Recommended Posts
This topic is 3830 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