-
-
Notifications
You must be signed in to change notification settings - Fork 251
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes #868 See Also #629 Signed-off-by: Ethan Dye <[email protected]>
- Loading branch information
Showing
13 changed files
with
95 additions
and
35 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
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 |
---|---|---|
|
@@ -27,4 +27,4 @@ wifi_country="" | |
|
||
# Java architecture mode | ||
# Use 32-bit or 64-bit | ||
java_arch=32-bit | ||
java_opt=Zulu32 |
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 @@ | ||
adoptopenjdk_install_apt(){ | ||
local adoptKey="/tmp/adoptopenjdk.asc" | ||
if ! dpkg -s 'adoptopenjdk-8-hotspot-jre' >/dev/null 2>&1; then # Check if already is installed | ||
echo -n "$(timestamp) [openHABian] Adding AdoptOpenJDK keys to apt... " | ||
wget -qO "$adoptKey" https://adoptopenjdk.jfrog.io/adoptopenjdk/api/gpg/key/public | ||
if cond_redirect apt-key add "$adoptKey"; then echo "OK"; else echo "FAILED (keyserver)"; exit 1; fi | ||
rm -f "$adoptKey" | ||
echo -n "$(timestamp) [openHABian] Installing AdoptOpenJDK... " | ||
cond_redirect systemctl stop openhab2.service | ||
cond_redirect update-alternatives --remove-all java | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
load adoptopenjdk-java | ||
load helpers | ||
|
||
@test "destructive-install_adopt" { | ||
echo -e "# \e[36mAdoptOpenJDK Java installation is being (test-)installed..." >&3 | ||
run systemctl start openhab2 | ||
run adoptopenjdk_install_apt | ||
echo -e "# \e[32mAdoptOpenJDK Java installation successful." >&3 | ||
[ "$status" -eq 0 ] | ||
echo -e "# \e[32mAdoptOpenJDK Java installation successful." >&3 | ||
run systemctl is-active --quiet openhab2 | ||
[ "$status" -eq 0 ] | ||
run java -version | ||
[ "$status" -eq 0 ] | ||
[[ $output == *"AdoptOpenJDK"* ]] | ||
} |
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
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
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