Run a script with user input from the GUI Scheduled Jobs

  • I have written my first script which copies some folders to different drives after getting some variables (Folder Names) input from the user and this all works from the CLI.
    I would like to be able to run this from the GUI without having to start putty etc but when I run this script from the OMC GUI Scheduled jobs it does not allow the user input just runs through without the 'read' and waiting for the user input - can anyone give me some ideas as to what is required to get this to run ?


    OMV 2.1.1

    • Offizieller Beitrag

    Well if you write your script in the text box like


    sh /root/script.sh user1 user2 user3


    the names should be passed as arguments like $1, $2 and $3 and so on vars inside the script


    This would mean you have to edit the job every time, or create one for each.

  • Thanks for the response. I had used "export FN-foldername;my_script.sh" in the Scheduled job and edited the foldername as required, which worked but was hoping for a more elegant solution and use Whiptail for some entry boxes etc but these don't display when run from the OMV GUI.

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!