Add OpenWRT support for binary quick script installation #445
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Modified the install-agent.sh script for binary installation to support OpenWRT.
I more or less tried to match your coding style, checking the OS type like you did with Alpine.
To add the service, instead of systemd a procd init script is used. The service can be enabled, started, stoped, etc. by using
service beszel-agent ...
.An update command is also included to update and restart the service. For automatic updates, I opted to use a crontab job that uses
service beszel-agent update
once a day.To get the OS type variable,
sed
is used instead oftr
, since most busybox systems have implmentations oftr
that do not support classes, as mentioned in this issue. This implementation is not the pretiest, since all 27 alphabet characters have to be included, but the upside is that this should support almost any linux system.