|
|
@ -1,13 +1,15 @@
|
|
|
|
// install.sh is generated by ./extra/install.batsh, do not modify it directly.
|
|
|
|
// install.sh is generated by ./extra/install.batsh, do not modify it directly.
|
|
|
|
// "npm run compile-install-script" to compile install.sh
|
|
|
|
// "npm run compile-install-script" to compile install.sh
|
|
|
|
// The command is working on Windows PowerShell and Docker for Windows only.
|
|
|
|
// The command is working on Windows PowerShell and Docker for Windows only.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// curl -o uptime-kuma-install.sh https://raw.githubusercontent.com/louislam/uptime-kuma/master/install.sh && sudo bash uptime-kuma-install.sh
|
|
|
|
println("=====================");
|
|
|
|
println("=====================");
|
|
|
|
println("Uptime Kuma Installer");
|
|
|
|
println("Uptime Kuma Installer");
|
|
|
|
println("=====================");
|
|
|
|
println("=====================");
|
|
|
|
println("");
|
|
|
|
println("Supported OS: CentOS 7/8, Ubuntu >= 16.04 and Debian");
|
|
|
|
println("---------------------------------------");
|
|
|
|
println("---------------------------------------");
|
|
|
|
println("This script is designed for Linux and basic usage.");
|
|
|
|
println("This script is designed for Linux and basic usage.");
|
|
|
|
println("Supported OS: CentOS 7/8, Ubuntu >= 16.04 and Debian");
|
|
|
|
|
|
|
|
println("For advanced usage, please go to https://github.com/louislam/uptime-kuma/wiki/Installation");
|
|
|
|
println("For advanced usage, please go to https://github.com/louislam/uptime-kuma/wiki/Installation");
|
|
|
|
println("---------------------------------------");
|
|
|
|
println("---------------------------------------");
|
|
|
|
println("");
|
|
|
|
println("");
|
|
|
@ -104,7 +106,7 @@ if (type == "local") {
|
|
|
|
if ("$3" != "") {
|
|
|
|
if ("$3" != "") {
|
|
|
|
port = "$3";
|
|
|
|
port = "$3";
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
call("read", "-p", "Listening Port [$port]: ", "port");
|
|
|
|
call("read", "-p", "Listening Port [$defaultPort]: ", "port");
|
|
|
|
|
|
|
|
|
|
|
|
if (port == "") {
|
|
|
|
if (port == "") {
|
|
|
|
port = defaultPort;
|
|
|
|
port = defaultPort;
|
|
|
@ -114,7 +116,7 @@ if (type == "local") {
|
|
|
|
if ("$2" != "") {
|
|
|
|
if ("$2" != "") {
|
|
|
|
installPath = "$2";
|
|
|
|
installPath = "$2";
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
call("read", "-p", "Installation Path [$installPath]: ", "installPath");
|
|
|
|
call("read", "-p", "Installation Path [$defaultInstallPath]: ", "installPath");
|
|
|
|
|
|
|
|
|
|
|
|
if (installPath == "") {
|
|
|
|
if (installPath == "") {
|
|
|
|
installPath = defaultInstallPath;
|
|
|
|
installPath = defaultInstallPath;
|
|
|
@ -210,7 +212,7 @@ if (type == "local") {
|
|
|
|
if ("$3" != "") {
|
|
|
|
if ("$3" != "") {
|
|
|
|
port = "$3";
|
|
|
|
port = "$3";
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
call("read", "-p", "Expose Port [$port]: ", "port");
|
|
|
|
call("read", "-p", "Expose Port [$defaultPort]: ", "port");
|
|
|
|
|
|
|
|
|
|
|
|
if (port == "") {
|
|
|
|
if (port == "") {
|
|
|
|
port = defaultPort;
|
|
|
|
port = defaultPort;
|
|
|
@ -232,3 +234,5 @@ if (type == "local") {
|
|
|
|
bash("docker volume create $volume");
|
|
|
|
bash("docker volume create $volume");
|
|
|
|
bash("docker run -d --restart=always -p $port:3001 -v $volume:/app/data --name uptime-kuma louislam/uptime-kuma:1");
|
|
|
|
bash("docker run -d --restart=always -p $port:3001 -v $volume:/app/data --name uptime-kuma louislam/uptime-kuma:1");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
println("http://localhost:$port");
|
|
|
|