Command to "Apply Changes"

General support for the Pi-Star System
Post Reply
N6MIK
Posts: 60
Joined: Wed Apr 18, 2018 12:53 am

Command to "Apply Changes"

Post 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!
W0CHP
Posts: 19
Joined: Mon Oct 12, 2020 2:33 pm

Re: Command to "Apply Changes"

Post 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.
KN2TOD
Posts: 335
Joined: Sun Nov 11, 2018 6:36 pm

Re: Command to "Apply Changes"

Post 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.
N6MIK
Posts: 60
Joined: Wed Apr 18, 2018 12:53 am

Re: Command to "Apply Changes"

Post by N6MIK »

Thank you both - I was able to take KN2TOD's pointers and paste some commands in... works perfectly for what I need.
Post Reply