Invoke Docker "Update All" button from script


S1dney

Recommended Posts

Hey Y'all!

 

I'm using a custom built bash script to update all my self built docker containers every once in a while.

It still requires me to login to the GUI and press the "Update All" button from the Docker tab tho..

I'm running these updates from the terminal so would rather have the code trigger this as well.

Have been searching through the php files etc to see if I can see how this is done but no luck yet.

 

I also have a script that allows my UPS to shutdown unraid in a clean manner which basically uses the CSRF token to control it.

    echo 'Stopping unraid array.'

    CSRF=$(cat /var/local/emhttp/var.ini | grep -oP 'csrf_token="\K[^"]+')

    # Send this command to the backgroup so we can check the status of the unmount on the array (last step unraid takes)
    # We send everything to /dev/null cause we're not interested in nohup's output
    nohup curl -k --data "startState=STARTED&file=&csrf_token=${CSRF}&cmdStop=Stop" https://localhost:5443/update.htm >/dev/null 2>&1 &

 

I assume that something similar must be possible for the Update All button?

Anyone able to assist here?

 

Appreciate the efforts!

Best regards,

Sidney

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.