-
-
Notifications
You must be signed in to change notification settings - Fork 314
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
fix - rclone upgrade, and added function #865
Open
ComputerByte
wants to merge
21
commits into
swizzin:develop
Choose a base branch
from
ComputerByte:develop
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
3804661
refactor
ComputerByte 13a2d9f
Update rclone.sh
ComputerByte dbe3a8d
+x
ComputerByte 207bcd0
format
ComputerByte 10e56de
format
ComputerByte 272b7ad
Update rclone.sh
ComputerByte 139e77c
format
ComputerByte 4f08de6
format
ComputerByte f80ce4e
format
ComputerByte 4f87092
format
ComputerByte 4e5c75a
format
ComputerByte ac53af8
Format
ComputerByte 38158ff
format
ComputerByte d0a5ae2
shellcheck: swap to correct check
brettpetch 13ba61b
fix: installer
brettpetch 7ec88d5
fix: rclone fixes
brettpetch 1ce578f
fix: byte's fingers are fat
brettpetch 24bb86a
sc: shh
brettpetch dd0ea6d
sh: shhhh
brettpetch 4c60bfa
sh: shhh
brettpetch 06c4302
space maybe
ComputerByte File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#!/bin/bash | ||
# rclone upgrader | ||
# byte 2022 for Swizzin | ||
|
||
#shellcheck source=sources/functions/utils | ||
. /etc/swizzin/sources/functions/utils | ||
#shellcheck source=sources/functions/rclone | ||
. /etc/swizzin/sources/functions/rclone | ||
|
||
if [[ ! -f /install/.rclone.lock ]]; then | ||
echo_error "rclone doesn't appear to be installed!" | ||
exit 1 | ||
fi | ||
|
||
_restart_rclone() { | ||
systemctl try-restart "rclone@" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
echo_progress_done "Service restarted" | ||
} | ||
|
||
_rclone_download_latest | ||
_restart_rclone | ||
|
||
echo_success "rclone upgraded" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#!/bin/bash | ||
|
||
# Install fuse | ||
function _fuse() { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This really doesn’t need to be its own function. It only needs to run on install. |
||
apt_install fuse | ||
sed -i -e 's/#user_allow_other/user_allow_other/' /etc/fuse.conf | ||
} | ||
|
||
function _rclone_download_latest() { | ||
echo_progress_start "Downloading and installing rclone" | ||
# One-liner to check arch/os type, as well as download latest rclone for relevant system. | ||
wget -q https://rclone.org/install.sh -O /tmp/rcloneinstall.sh >> "${log}" 2>&1 | ||
|
||
# Make sure rclone downloads and installs without error before proceeding | ||
if ! bash /tmp/rcloneinstall.sh; then | ||
echo_error "Rclone installer failed" | ||
exit 1 | ||
fi | ||
} |
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.
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.
Users are never defined if you’re going to be looping through them to restart the services.