forked from openhab/openhabian
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes openhab#868 See Also openhab#629 Signed-off-by: Ethan Dye <[email protected]>
- Loading branch information
Showing
6 changed files
with
43 additions
and
4 deletions.
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,19 @@ | ||
adoptopenjdk_install_apt(){ | ||
if ! dpkg -s 'adoptopenjdk-8-hotspot-jre' >/dev/null 2>&1; then # Check if already is installed | ||
cond_redirect systemctl stop openhab2.service | ||
echo -n "$(timestamp) [openHABian] Installing AdoptOpenJDK... " | ||
cond_redirect update-alternatives --remove-all java | ||
if cond_redirect wget -O - https://adoptopenjdk.jfrog.io/adoptopenjdk/api/gpg/key/public | apt-key add -; then echo "OK"; else echo "FAILED (keyserver)"; exit 1; fi | ||
echo "deb http://adoptopenjdk.jfrog.io/adoptopenjdk/deb buster main" > /etc/apt/sources.list.d/adoptopenjdk.list | ||
cond_redirect apt-get update | ||
if cond_redirect apt-get --yes install adoptopenjdk-8-hotspot-jre; then echo "OK"; else echo "FAILED"; exit 1; fi | ||
cond_redirect systemctl start openhab2.service | ||
fi | ||
} | ||
adoptopenjdk_uninstall_apt(){ | ||
if dpkg -s 'adoptopenjdk-8-hotspot-jre' >/dev/null 2>&1; then | ||
echo -n "$(timestamp) [openHABian] Removing AdoptOpenJDK... " | ||
rm /etc/apt/sources.list.d/adoptopenjdk.list | ||
if cond_redirect apt-get --yes remove adoptopenjdk-8-hotspot-jre; then echo "OK"; else echo "FAILED"; exit 1; fi | ||
fi | ||
} |
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 |
---|---|---|
|
@@ -169,5 +169,5 @@ tryUntil() { | |
echo -n ".${i}." | ||
((i-=1)) | ||
done | ||
return $i | ||
return "$i" | ||
} |
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