Skip to content

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

Open
wants to merge 8 commits into
base: dev
Choose a base branch
from

Conversation

orangevan
Copy link

No description provided.

A deployment script for certificates issued to Edgemax routers made by Ubiquiti.
@orangevan orangevan changed the title Patch 1 Create Edgemax deploy script. Jan 26, 2018
fixed formatting and some added some quotation marks to make Travis Happy.
more formatting fixes
@@ -0,0 +1,80 @@
#!/bin/bash
Copy link
Member

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'

Copy link
Author

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?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#returns 0 means success, otherwise error.

######## Public functions #####################
function atexit() {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove the function keyword

Copy link
Author

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)"
Copy link
Member

@Neilpang Neilpang Feb 2, 2018

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.

Copy link
Author

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.

Copy link
Author

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.

Copy link
Member

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.

Copy link
Author

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
@Neilpang Neilpang deleted the branch acmesh-official:dev January 19, 2022 12:56
@Neilpang Neilpang closed this Jan 19, 2022
@Neilpang Neilpang reopened this Jan 19, 2022
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.

2 participants