|
@@ -1,4 +1,33 @@
|
|
|
#!/bin/bash
|
|
|
|
|
|
-sudo apt update
|
|
|
-sudo apt -y install htop
|
|
|
+ADD_PKG="htop tree jq curl"
|
|
|
+DEL_PKG=""
|
|
|
+BESZEL_INSTALL_SCRIPT_URL_ORIG="https://raw.githubusercontent.com/henrygd/beszel/main/supplemental/scripts/install-agent.sh"
|
|
|
+BESZEL_INSTALL_SCRIPT_URL="https://git.linuxforward.com/byom/ovhcli/raw/main/bin/beszel-install-agent.sh"
|
|
|
+BESZEL_SSH_PORT="${BESZEL_SSH_PORT:-45876}"
|
|
|
+BESZEL_SSH_PUBKEY="${BESZEL_SSH_PUBKEY:-"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIChREmc/b6/MeHSbFRdpiUoHStQDGgUKEkyobrWL9nBB"}"
|
|
|
+
|
|
|
+install_packages(){
|
|
|
+ sudo apt -qq update
|
|
|
+ sudo apt -y install ${ADD_PKG}
|
|
|
+}
|
|
|
+
|
|
|
+remove_packages(){
|
|
|
+ sudo apt -y purge ${DEL_PKG}
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
+install_beszel(){
|
|
|
+ curl -sL "${BESZEL_INSTALL_SCRIPT_URL}" -o install-agent.sh \
|
|
|
+ && chmod +x install-agent.sh \
|
|
|
+ && ./install-agent.sh -p "${BESZEL_SSH_PORT}" -k "${BESZEL_SSH_PUBKEY}" -a
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+install_packages
|
|
|
+#remove_packages
|
|
|
+install_beszel
|
|
|
+
|