Launch .SH on ubuntu 22.04/debian 11
-
Hi ,
i try to understand how scripts .sh are launch in linux with client mono.I have installed mono succesfully, service runing, certificate ok on fog.log:
status check-in for my machine when snapin is launched on server, so the comunication works.on fog server i launch a single snapin install,and the result on fog.log is:
error code 126i think my problem come from my setup on my snapin. i usually made snapins for windows, and i always setup the password of the account that have the right on my machine. ( just after my .ZIP).
Here when i setup bash type in Template, i can’t add a password. ( field grey ).
here is my snapin setup:
in the zip folder there is my ScriptAgent.shis the correct way to made a snapin for linux for a .sh script ?
How fog agent from mono can use a root account ? and how to give the password of root eventually ?
and last question, fog client can made may script executable too ?
best regards yannick
-
@yannickF Snapins are scripts at the very basic level.
Using the “Zip” method, you’d actually want to use Snapin Pack format as that will (or should) extract the zip, then your bash statement would call out the shell script within the zip file.
The way you have this right now, essentially you’re telling the Zip file to run. Which, as you’ve no doubt found, wouldn’t really do anything if this is indeed a true "zip’ file.
-
@Tom-Elliott
hi, thanks for your response !
i understand. so now i have modified the .zip with my script.sh . and selected snapin pack mode.
Now i see the snapin correctly copied on my ubuntu in /opt/fog-service/tmp:
but still an error : unable to run moduleif i try ’ ll ’ command, i see that the script is not executable !
how fog-Agent launch the script ? :
I mean the fog-Agent run the script in root ? or like windows i need to setup a specefic user ?
and the fog-Agent change the script to executable script ?thanks for your help
-
@yannickF It runs as the system user. In linux world this would essentially be root, yes.
Is the ZIP file containing more than just the ScriptAgent shell script?
-