• Recent
    • Unsolved
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    Launch .SH on ubuntu 22.04/debian 11

    Scheduled Pinned Locked Moved Solved
    Linux Problems
    2
    4
    722
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Y
      yannickF
      last edited by yannickF

      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: Capture d’écran 2023-03-13 à 12.01.54.png
      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: Capture d’écran 2023-03-13 à 12.03.56 (1).png
      error code 126

      i 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:
      Capture d’écran 2023-03-13 à 12.14.58.png
      in the zip folder there is my ScriptAgent.sh

      is 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

      Tom ElliottT 1 Reply Last reply Reply Quote 0
      • Tom ElliottT
        Tom Elliott @yannickF
        last edited by

        @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.

        Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG! Get in contact with me (chat bubble in the top right corner) if you want to join in.

        Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

        Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

        Y 1 Reply Last reply Reply Quote 1
        • Y
          yannickF @Tom Elliott
          last edited by yannickF

          @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:
          OcsFog.png
          but still an error : unable to run module

          if 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

          Tom ElliottT 1 Reply Last reply Reply Quote 0
          • Tom ElliottT
            Tom Elliott @yannickF
            last edited by

            @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?

            Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG! Get in contact with me (chat bubble in the top right corner) if you want to join in.

            Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

            Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

            1 Reply Last reply Reply Quote 0
            • [[undefined-on, S Sebastian Roth, ]]
            • 1 / 1
            • First post
              Last post

            196

            Online

            12.0k

            Users

            17.3k

            Topics

            155.2k

            Posts
            Copyright © 2012-2024 FOG Project