Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add remote reconnect command #53

Open
wants to merge 164 commits into
base: master
Choose a base branch
from
Open

Conversation

kn2tod
Copy link
Contributor

@kn2tod kn2tod commented Sep 15, 2022

Add ability to initiate wifi reconnect sequence via a remote command

  1. new file: batch file (pistar-reconnect) that duplicates the wifi reconnect sequence given in the wifi.php; invoked by pistar-remote.

  2. mod to pistar-remote: add DMR command code to initiate the wifi reconnect batch file

  3. mods: misc: return system to RO mode following hostfile updates; handle error when DMR log file is empty.

Note: User will need to add appropriate entry to /etc/pistar-remote and make codeplug changes to utilize this feature:

[dmr]
TG commands
:
hostfiles=8999995
reconnect=8999994 <-----

@kn2tod
Copy link
Contributor Author

kn2tod commented Sep 21, 2022

Add: pistar-config-backup: same as config-backup php: back up configurations via command line (in case the dashboard means is not accessible; ref: https://forum.pistar.uk/viewtopic.php?t=4366&sid=a206a36ec2ee881d951569c6ed02c017

@kn2tod
Copy link
Contributor Author

kn2tod commented Nov 14, 2022

Thoughts? Comments? New feature - does not change any current functionality.

@MW0MWZ
Copy link
Collaborator

MW0MWZ commented Nov 15, 2022

Please seperate the config back from the wifi re-connect - they are two different things.
For the remote command to re-connect the wifi - sure i can add that in, but why make a bash script for that, when you can call it all from python?

@W0CHP
Copy link

W0CHP commented Nov 30, 2022

I suggest adding /etc/dgidgateway to the pistar-config-backup script. It's part of "stock Pi-Star", and it's consistent with the dashboard backup/config functionality:
https://github.com/AndyTaylorTweet/Pi-Star_DV_Dash/blob/1a4a0d30af2c6c24d40ea42a40371f89b2eeaf45/admin/config_backup.php#L73

@kn2tod
Copy link
Contributor Author

kn2tod commented Nov 30, 2022

Ouch! How the heck did I miss that?!?! Thanks!

@W0CHP
Copy link

W0CHP commented Nov 30, 2022 via email

@kn2tod
Copy link
Contributor Author

kn2tod commented Dec 19, 2022

I coded the reconnect command process the same way the host file update process is coded - using an external script to implement the "details". "Hooking" in code like this gives a certain flexibility to making changes going forward, given that additional steps (error checks/retry logic) might need to be added - all without messing with the invoking process.
It is consistent with your original logic for the host file update process. And, who knows, the external script could be "personalized" to include/experiment with rewrite rules and the like without incorporating those into the core (public) code. Does this make sense?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants