Page 1 of 1
Command to "Apply Changes"
Posted: Fri Feb 11, 2022 5:47 pm
by N6MIK
I am writing a script that modifies mmdvmhost. I currently end that with a "pistar-update" to apply the changes but this takes a bit of time, and causes un-needed workload of pulling the updates etc.
Is there a command line version of "Apply Change" that can be called from a bash script? Thank you!
Re: Command to "Apply Changes"
Posted: Sat Feb 12, 2022 12:29 pm
by W0CHP
I do this exact thing with cURL, by sending a POST request to ‘admin/configure.php’ and specifying the “config” form ID to the curl params. This is the equivalent of hitting “apply changes”.
Lots of examples out there on how to do this.
Caveat emptor: You’ll also need to specify the user/pass with cURL for the basic http auth to the admin section since it’s protected.
Re: Command to "Apply Changes"
Posted: Sat Feb 12, 2022 2:30 pm
by KN2TOD
Your script modifies (applies a change to ) your configuration but you need to cycle (restart) the service task to implement those changes: look at the service_handle() function in the pistar-update script and extract what you need from it for inclusion in your script.
Re: Command to "Apply Changes"
Posted: Wed Feb 16, 2022 4:17 am
by N6MIK
Thank you both - I was able to take KN2TOD's pointers and paste some commands in... works perfectly for what I need.