Add Gitea bootstrap for production commands
This commit is contained in:
Executable
+26
@@ -0,0 +1,26 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
RAW_BASE="${RAW_BASE:-https://producao-gitea.0jo7zj.easypanel.host/tiago/Condominio_SeConectai/raw/branch/main/scripts}"
|
||||
BIN_DIR="${BIN_DIR:-/usr/local/bin}"
|
||||
|
||||
if ! command -v curl >/dev/null 2>&1; then
|
||||
echo "Erro: curl nao encontrado. Instale com: apt update && apt install -y curl"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
install_cmd() {
|
||||
local name="$1"
|
||||
local url="$RAW_BASE/$name"
|
||||
local dest="$BIN_DIR/$name"
|
||||
echo "Baixando $url"
|
||||
curl -fsSL "$url" -o "$dest"
|
||||
chmod 0755 "$dest"
|
||||
}
|
||||
|
||||
install_cmd seconectaicondominio.install
|
||||
install_cmd seconectaicondominio.update
|
||||
|
||||
echo "Comandos instalados em $BIN_DIR:"
|
||||
echo " seconectaicondominio.install SENHA_MASTER_INICIAL"
|
||||
echo " seconectaicondominio.update"
|
||||
Reference in New Issue
Block a user