This repository has been archived by the owner on May 28, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 10
Create an uninstaller and updater, add support for ARM64/AARCH64 update readme and rename MAIN.sh to main.sh #6
Open
Lloir
wants to merge
8
commits into
bc1bb:master
Choose a base branch
from
Lloir:master
base: master
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
8 commits
Select commit
Hold shift + click to select a range
7e98916
Ubuntu RPI 64bit aarch64 fix
Lloir aa18118
Create uninstall.sh
Lloir f36d418
Rename MAIN.sh to main.sh
Lloir 1faf800
Create update.sh
Lloir 1a13a2e
Update uninstall.sh
Lloir 66e256c
Update README.md
Lloir a35afca
Update README.md
Lloir a568d39
Merge pull request #1 from Lloir/patch-1
Lloir 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 |
---|---|---|
|
@@ -16,10 +16,13 @@ arch=$(uname -m) | |
|
||
if [ "$(echo "$links" | grep "$arch")" ]; then | ||
link=$(echo "$links" | grep "$arch") | ||
else | ||
if arch=aarch64 ; then | ||
arch=arm64 | ||
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. It works but I would prefer the whole script written in the same way, this might look better and more readable: if [ "$arch" = "aarch64" ]; then
arch="arm64" |
||
else | ||
fatal "Looks like we can't download checkra1n for you architecture ($arch)" | ||
fi | ||
|
||
fi | ||
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. no need to add a |
||
link=$(echo "$links" | grep "$arch") | ||
# here we have the link corresponding to machine's arch | ||
|
||
|
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 @@ | ||
#!/usr/bin/env bash | ||
# Lloir - 2020 - (github:Lloir) | ||
# This script is part of Webra1n As a Service (github:jusdepatate/webra1n-as-a-service) | ||
|
||
systemctl stop webra1n | ||
systemctl disable webra1n | ||
rm /etc/systemd/system/webra1n.service | ||
systemctl daemon-reload | ||
# remove systemd service | ||
|
||
cp /etc/sudoers.beforewebra1n /etc/sudoers || fatal "Couldn't use /etc/sudoers backup" | ||
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.
|
||
deluser checkra1n | ||
# remove checkra1n user | ||
|
||
rm /usr/bin/checkra1n | ||
rm /usr/bin/webra1n | ||
rm /usr/bin/checkra1nunkillable | ||
# remove compilated executable from PATH | ||
|
||
rm checkra1n | ||
rm checkra1nunkillable/checkra1nunkillable | ||
rm webra1nlauncher/webra1n | ||
# remove compilated executable from here |
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,27 @@ | ||
#!/usr/bin/env bash | ||
# Lloir - 2020 - (github:Lloir) | ||
# This script is part of Webra1n As a Service (github:jusdepatate/webra1n-as-a-service) | ||
|
||
# Stop services prior to update | ||
systemctl stop webra1n | ||
systemctl disable webra1n | ||
|
||
# Remove the older binaries | ||
|
||
rm /usr/bin/checkra1n | ||
rm /usr/bin/webra1n | ||
rm /usr/bin/checkra1nunkillable | ||
|
||
./checkra1n-downloader/checkra1n-downloader.sh || fatal "Checkra1n-Download.sh failed" | ||
chmod +x checkra1n || fatal "Looks like we can't edit permissions of checkra1n executable" | ||
cp checkra1n /usr/bin/checkra1n || fatal "Couldn't move checkra1n in /usr/bin" | ||
|
||
# Recompile webra1n | ||
gcc webra1nlauncher/webra1nlauncher.c -o webra1nlauncher/webra1n || fatal "webra1nlauncher compilation failed" | ||
chmod +x webra1nlauncher/webra1n || fatal "Looks like we can't edit permissions of webra1n launcher" | ||
cp webra1nlauncher/webra1n /usr/bin/webra1n || fatal "Couldn't move webra1n in /usr/bin" | ||
|
||
# Restart everything | ||
systemctl daemon-reload | ||
systemctl enable webra1n | ||
systemctl start webra1n |
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.
is it done ?