Last active
March 3, 2023 00:57
-
-
Save mallendeo/b09965d1e7cc4c08b026ba09ef16b793 to your computer and use it in GitHub Desktop.
Update all NGINX Proxy Manager hosts at once
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Run this on the browser dev console of nginx proxy manager | |
{ | |
const wait = (t = 1000) => new Promise(r => setTimeout(r, t)) | |
const rows = document.querySelectorAll('tbody tr') | |
const update = async () => { | |
await wait() | |
document.querySelector('#modal-dialog .btn.save').click() | |
await wait() | |
} | |
const main = async () => { | |
for (const row of rows) { | |
console.log(row.querySelector('.host-link').textContent) | |
row.querySelector('.item-action.dropdown .edit.dropdown-item').click() | |
await update() | |
} | |
} | |
main() | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment