-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Create Edgemax deploy script. #1226
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
base: dev
Are you sure you want to change the base?
Conversation
A deployment script for certificates issued to Edgemax routers made by Ubiquiti.
fixed formatting and some added some quotation marks to make Travis Happy.
more formatting fixes
@@ -0,0 +1,80 @@ | |||
#!/bin/bash |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please change the shebang to the same as the others'
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm confused on this request. When I look at all of the other deploy scripts, they are just
#!/bin/bash
Same as this one.
What do you want me to change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
deploy/edgemax.sh
Outdated
#returns 0 means success, otherwise error. | ||
|
||
######## Public functions ##################### | ||
function atexit() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove the function
keyword
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removed. Tested, still works. Thanks.
_info "EdgeMax cert-file already set to $lighttpd_pem" | ||
fi | ||
_info Restarting lighttpd | ||
sudo kill -SIGTERM "$(cat /var/run/lighttpd.pid)" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do the sudo
need to input password ?
do not use sudo in the script.
if you really want to do something as root, install and run acme.sh as root. do not use sudo in your script.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On these particular devices (edgemax), in their build of linux sudo does not require a password. It is however required to restart the web service that the certificate is being installed to though i'd rather all the other tasks the script does not run as root. I will double verify that I can't reboot the webserver as the standard user but I am fairly confident that sudo is required.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have checked and I cannot reboot the web service (needed for deployment) without root privileges but for installation and execution of tasks/cronjobs etc ideally on these devices i'd like them to be user level.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the sudo requires inputing password, the cronjob will be broken.
Never never never use sudo.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the sudo does not require inputting password
Adding code to check for CRON JOB in router configuration and adding if not already there
Update base from upstream
No description provided.