-
-
Notifications
You must be signed in to change notification settings - Fork 107
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refine installer for lightsail. v5.14.19
- Loading branch information
Showing
6 changed files
with
57 additions
and
12 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 |
---|---|---|
|
@@ -6,4 +6,4 @@ | |
package main | ||
|
||
// The version for platform. | ||
const version = "v5.14.17" | ||
const version = "v5.14.19" |
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 |
---|---|---|
@@ -1,19 +1,35 @@ | ||
#!/bin/bash | ||
|
||
sudo apt-get update -y && | ||
sudo apt-get install -y curl docker.io | ||
if [[ $? -ne 0 ]]; then echo "Install curl failed."; exit 1; fi | ||
SUDO=sudo | ||
if [[ $EUID -eq 0 ]]; then | ||
SUDO= | ||
fi | ||
echo "Use SUDO=$SUDO" | ||
|
||
if [[ $(curl --version 1>/dev/null 2>/dev/null && docker --version 1>/dev/null 2>/dev/null && echo yes) != yes ]]; then | ||
$SUDO apt-get update -y && | ||
$SUDO apt-get install -y curl docker.io | ||
if [[ $? -ne 0 ]]; then echo "Error: Install curl failed."; exit 1; fi | ||
fi | ||
echo "Check curl and docker ok." | ||
|
||
rm -f linux-oryx-en.tar.gz && | ||
curl -O -fsSL https://github.com/ossrs/oryx/releases/latest/download/linux-oryx-en.tar.gz | ||
if [[ $? -ne 0 ]]; then echo "Download oryx failed."; exit 1; fi | ||
if [[ $? -ne 0 ]]; then echo "Error: Download oryx failed."; exit 1; fi | ||
echo "Download Oryx ok." | ||
|
||
tar xf linux-oryx-en.tar.gz | ||
if [[ $? -ne 0 ]]; then echo "Unpack oryx failed."; exit 1; fi | ||
if [[ $? -ne 0 ]]; then echo "Error: Unpack oryx failed."; exit 1; fi | ||
if [[ ! -f oryx/mgmt/bootstrap ]]; then | ||
echo "Error: No bootstrap found."; exit 1; | ||
fi | ||
echo "Unpack Oryx ok." | ||
|
||
sed -i 's|MGMT_PORT=2022|MGMT_PORT=80|g' oryx/mgmt/bootstrap && | ||
sed -i 's|HTTPS_PORT=2443|HTTPS_PORT=443|g' oryx/mgmt/bootstrap | ||
if [[ $? -ne 0 ]]; then echo "Update bootstrap failed."; exit 1; fi | ||
if [[ $? -ne 0 ]]; then echo "Error: Update bootstrap failed."; exit 1; fi | ||
echo "Update bootstrap ok." | ||
|
||
sudo bash oryx/scripts/setup-ubuntu/install.sh | ||
if [[ $? -ne 0 ]]; then echo "Install oryx failed."; exit 1; fi | ||
$SUDO bash oryx/scripts/setup-ubuntu/install.sh | ||
if [[ $? -ne 0 ]]; then echo "Error: Install oryx failed."; exit 1; fi | ||
echo "Install Oryx ok." |
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