S1dney Posted October 30, 2021 Share Posted October 30, 2021 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 Quote Link to comment
tjb_altf4 Posted October 30, 2021 Share Posted October 30, 2021 Look in the docker.js referenced by the docker page's source, you'll see the updateAll function with what you need. 1 Quote Link to comment
Squid Posted October 30, 2021 Share Posted October 30, 2021 Or just run the auto update plugin and set it to update the containers on the schedule you set. Or base your code off of it's script (updateDocker.php) 1 Quote Link to comment
S1dney Posted October 31, 2021 Author Share Posted October 31, 2021 (edited) Hmm, did not get a notification on these replies. Guess I wasn’t following my own topic yet lol. Following now. Good suggestions tho! I’ll check those out and report back later on. Cheers! Edited October 31, 2021 by S1dney Quote Link to comment
Recommended Posts
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.