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

    Run script on the server immediately after multicast is done

    Scheduled Pinned Locked Moved Unsolved
    FOG Problems
    2
    3
    370
    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.
    • A
      andreiv
      last edited by

      This is not a technical problem but maybe someone can give me an idea. I need to run a script as root, on the server, after the multicast is done.

      Server OS is Ubuntu 16.04,

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

        This isn’t something FOG would manage, though you could modify the FOGMulticastManager service to handle this for you. The file you’d need to edit to allow running the script would be located in /var/www/fog/lib/service/multicastmanager.class.php

        You’ll have to see where the script completes tasks and run your script at that point. The FOGMulticastManager is started as root, so the running of your script should run as that same user under this case.

        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

        A 1 Reply Last reply Reply Quote 0
        • A
          andreiv @Tom Elliott
          last edited by

          @tom-elliott
          Thank you for your reply. I thought about this too but I’m a bit uncomfortable with modifying the FOG code. Plus, it would break if I upgrade.
          I got another idea yesterday, after writing this post. I was thinking about a script, that would run from cron, about every 10 minutes. It would check if udp-sender is running. If it isn’t, it would just exit. If it is, it would start monitoring the process and, when it finishes, it would launch my custom code.
          This would work if udp-sender runs only during multicast. I suppose this is the case. I don’t see any reason for it to run otherwise.
          How does this sound?

          1 Reply Last reply Reply Quote 0
          • 1 / 1
          • First post
            Last post

          195

          Online

          12.0k

          Users

          17.3k

          Topics

          155.2k

          Posts
          Copyright © 2012-2024 FOG Project