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
v5.0.1 install.sh does not work to upgrade sshnp/sshnpd #761
Comments
Fixed. Took me a while but I eventually realized that the tmux function in the script was masking the tmux command itself Here are the relevant output portions from my fixed branch for an install, re-install, re-install with sshnpd service running
|
So I tried the new install.sh and it worked but only on the second time.. See log below..
|
Plus the tmux restart of the job assumes that it is running a bash shell I think which it may not be. On Ubuntu I notice that often/sometimes the tmux session uses /bin/sh.. Perhaps as we start the tmux we force a bash shell ? again see below from the tmux console
|
Platform? I tested this repeatedly this morning and it worked 🤔 |
|
Re: tmux restart : perhaps we should remove the kill and restart and instead just prompt the user that they need to do so. Previous behavior was just a tmux kill-session which seemed wrong |
@cconstab I see no output at all from your first "install tmux sshnpd" - can you "set -x" before running it, so we can see what it is doing, exactly? On second run again I would have expected to see more output (re crontab etc) so that's even weirder Are you running the install.sh which is currently in trunk? |
I cut and paste the install.sh in trunk yup.. Will rerun tomorrow.. thought it odd so reopened for more testing. |
I've found the main problem you've encountered, it seems to be a combination of two things (1) a bug in setting user_home IF you have su'd to the current user (2) a bug in my renaming of binaries to .old / removing of old .old binaries. PR will follow shortly |
Not sure I understand this ... how does the restart assume that it is running a bash shell? This is what install.sh does to kill and restart the session if there is one running; I don't see anything bash-specific in these commands ... what am I missing?
FYI The template sshnpd.sh uses #!/bin/sh - should we change that? |
Nothing assumes a bash shell here
No, we are using POSIX shell for better compatibility. |
FYI shellcheck is a big help in ensuring POSIX shell compliance: Vscode extension:
|
Describe the bug
various problems with upgrade process that need to be addressed
If sshnp/sshnpd are in use then they cannot be copied over (I have sucessfully
dodged this by mv sshnpd sshnpd.old
then usingcp
The tmux install fails badly see bel;ow
Steps to reproduce
Expected behavior
just works/upgrades with single command idealy so you could use sshnp to upgrade in a single command to make things easier if you had 100 or 1000 machines!
Perhaps auto upgrade solution ?
Screenshots
Smartphones
Were you using an atApplication when the bug was found?
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: