-
Notifications
You must be signed in to change notification settings - Fork 66
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
TEDAPI network route script #519
Comments
Hi @SCHibbard - I created this issue to track the enhancement and work through details. First pass, it looks good, but I would remove the requirement for the user to run setup.sh before running this script. Ideally someone would be able to run this first (eventually even have setup.sh run it), get the 192.168.91.1 route in place and setup.sh would detect and use that when it runs. Would need to address these parts... if [ ! -f pypowerwall.env ]; then
echo "ERROR: Missing pypowerwall.env file. This must run from Powerwall Dashboard installation directory."
echo ""
exit 1
fi
...
if ! $(docker ps | grep -qw "pypowerwall"); then
echo "Docker is not running, or pypowerwall docker container is not running."
echo "Run Powerwall Dashboard setup before running this script."
exit 1
fi
....
docker exec -it pypowerwall python3 -m pypowerwall scan -ip=${IP}
Do you want to submit this as a pull request? GitHub will add you as a contributor to the project. :) Details on how to do that:
Otherwise, let me know and I'll add it. |
@jasonacox: Wondered about starting a new issue, thanks. I can do a pull request this weekend. As far as requiring Powerwall Dashboard to be up and running, my only reason was to put the generated script in the same folder (and to steal your network scan function!) I had originally placed it in /etc, but changed my mind. You see a problem putting it there? Better place? |
It would be nice to allow the user to run optionally run |
Slowly getting back to things after walking a 1.2M ft^2 trade show for a week. I understand now why you'd like |
Sorry, I didn't comment on the script location. From a security point of view, I agree with you that the resulting script that root's crontab runs needs to be a protected file that only root can edit (sudo). If our project later makes enhancements or fixes to the However, giving nod to https://en.wikipedia.org/wiki/Filesystem_Hierarchy_Standard I think it is probably best to avoid putting executable scripts in /etc and putting those in /root or /root/scripts instead. I suspect there are some packages that do put executables in /etc but that folder is typically reserved for configuration data or OS specific package manager configuration scripts. Using /root or /root/scripts as the location will also make it transparent to the system owner/admin that this is a root level cron task (we might even add that as a comment to the script). |
Thanks, should have checked. My Unix filesystem hierarchy experience dates back to the late 70s, I think backed then we stuffed lots of things in /etc without regard to organization. |
Script modified and waiting for you! Few points:
|
Closing this with the release. |
Add network route setup script to help Dashboard users connect with TEDAPI gateway endpoint.
Originally posted by @SCHibbard in #387 (comment)
The text was updated successfully, but these errors were encountered: