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
feat: New bundles to replace templates in releases #602
Conversation
# shellcheck disable=SC2154 | ||
"$HOME"/.local/bin/sshnpd -a "$device_atsign" -m "$manager_atsign" -d "$device_name" -v | ||
sleep 10 | ||
done |
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.
Simplified version of the old headless script we were using, this one intentionally requires manually configuration so that users actually know and learn how to configure their own instances of sshnpd
# disable "var is referenced but not assigned" warning for template | ||
# shellcheck disable=SC2154 | ||
"$HOME"/.local/bin/sshrvd -a "$atsign" -i "$internet_address" | ||
sleep 10 |
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.
Same story but for sshrvd
@@ -0,0 +1,296 @@ | |||
#!/bin/sh | |||
|
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.
New POSIX sh compliant install script, should also work on ash!
- I make some assumptions, remove some smoke and mirrors, which has resulted in 4x less shell script to maintain, and the shell script is also much less complicated as well
|
||
install_systemd_sshnpd() { | ||
root_only | ||
install_single_binary "sshnpd" |
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.
while systemd units can be installed as a --user unit, it adds a lot of complexity not worth trying to automate. hence root_only
echo "" | ||
echo "Warning: logs stored at $log_file and $err_file have unlimited potential size" | ||
echo "In a production environment, it's recommended that you install via systemd" | ||
echo "or use a cron job to call logrotate on these log files if systemd is not available" |
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.
logrotate isn't available on every system, so I'm not trying to automate it or have to call it... this option should be a last resort anyways.
echo "" | ||
echo "Warning: sometimes tmux is not set to linger which will kill the tmux session on logout" | ||
echo "Make sure your system is configured so that tmux sessions can linger, or disown the tmux process before logging out" | ||
} |
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.
There are ways to automate this, but each solution has trade-offs, leave it to the user to pick and choose.
|
||
At this time, windows doesn't have an automated installer. To use the sshnp.exe | ||
client, copy the binary to a convenient location for you. You may also add the | ||
binary to a folder in the PATH so that it can be accessed from anywhere. |
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 plan to update this in a further PR, but just so we have something for now.
@@ -1,3 +1,6 @@ | |||
# Dockerfile | |||
# Build image for a containerized instance of sshnpd | |||
|
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.
Labelling all of our dockerfiles so we know what they do and why they need to exist
case "$SSHNP_VERSION" in | ||
# TODO remove latest to signify deprecation on the launch of v4.0.0 | ||
latest|1.*|2.*|3.*|4.0.0-test.*|4.0.0-rc.*) | ||
# no message, this group is expected to use this 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.
Added an automated deprecation message which will automatically trigger on 4.0.0 and later, we just have to remove latest from the safe-list once we release 4.0.0 (this is the old script)
- What I did
- How I did it
- How to verify it
- Description for the changelog
feat: New bundles to replace templates in releases