December 3, 201411 yr 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?
December 10, 201411 yr Author Yes, but with ScriptMaster I could trigger such an execution…which is what I want. So does anyone know if it works?
December 13, 201411 yr Author 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”.
December 17, 201411 yr "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.
December 20, 201411 yr Author 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.
January 30, 201510 yr 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
Create an account or sign in to comment