mirror of
https://github.com/amidaware/tacticalrmm.git
synced 2026-04-26 23:15:57 +03:00
[GH-ISSUE #2162] Error running update.sh - Stuck in loop "Old update script detected..." #3283
Labels
No labels
In Process
bug
bug
dev-triage
documentation
duplicate
enhancement
fixed
good first issue
help wanted
integration
invalid
pull-request
question
requires agent update
security
ui tweak
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/tacticalrmm#3283
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @nativeit on GitHub (Mar 6, 2025).
Original GitHub issue: https://github.com/amidaware/tacticalrmm/issues/2162
Server Info (please complete the following information):
Installation Method:
--insecureflag at installAgent Info (please complete the following information):
Describe the bug
I went to update my server using the routine method of SSH, switch to user "tactical", run the update.sh script.
To Reproduce
Steps to reproduce the behavior:
tacticaluserupdate.shastacticalOld update script detected, downloading and replacing with the latest version...in an unending loop.Expected behavior
The standard update routine, including the version check and downloading of an updated script, if necessary.
Screenshots
Additional context
I notice this is a major version level update, my apologies if this is necessarily an exceptional version that requires additional steps that I just hadn't clocked (I read through the changelog). Only partially related, but kudos on getting to 1.0.0!
@nativeit commented on GitHub (Mar 7, 2025):
OK, I found my problem to be the script path, it has to be run such that
.==$PWDI'm sure there's probably a way to avoid that in Bash, but it's likely not any kind of a priority just now (and I'm going to venture to guess that this is documented somewhere, but I hadn't fully registered it).
Anyway, congrats on v1!
@nativeit commented on GitHub (Mar 7, 2025):
Just because it's front of mind now, I took a quick gander, and I think if the 'wget' output flag within the
ifstatement that checks for updates was more specifically defined, this could be avoided.Original code:
Modified code:
Since
THIS_SCRIPT=$(readlink -f "$0")(declared up top) gets interpreted as the full path and filename for the script, then this would ensure that the update call will always re-write the original script, regardless of where the script is called from.Might be helpful for some folks' automation (present company included). I'd be happy to pull request this, although it seems like kind of a dainty request...
EDIT: Added double-quotes around the variable. Tested this, and it does indeed work.