Migrate all Alpine Scripts into Main Scripts

This commit is contained in:
MickLesk
2026-08-18 10:31:25 +02:00
parent 07b8ff91b8
commit ca19a8e0bd
56 changed files with 3755 additions and 1377 deletions
+44 -26
View File
@@ -13,36 +13,54 @@ setting_up_container
network_check
update_os
fetch_and_deploy_gh_release "prometheus" "prometheus/prometheus" "prebuild" "latest" "/usr/local/bin" "*linux-$(arch_resolve).tar.gz"
setup_deb_based() {
fetch_and_deploy_gh_release "prometheus" "prometheus/prometheus" "prebuild" "latest" "/usr/local/bin" "*linux-$(arch_resolve).tar.gz"
msg_info "Installing Prometheus"
mkdir -p /etc/prometheus
mkdir -p /var/lib/prometheus
mv /usr/local/bin/prometheus.yml /etc/prometheus/prometheus.yml
msg_ok "Installed Prometheus"
msg_info "Installing Prometheus"
mkdir -p /etc/prometheus
mkdir -p /var/lib/prometheus
mv /usr/local/bin/prometheus.yml /etc/prometheus/prometheus.yml
msg_ok "Installed Prometheus"
msg_info "Creating Service"
cat <<'EOF' >/etc/systemd/system/prometheus.service
[Unit]
Description=Prometheus
Wants=network-online.target
After=network-online.target
msg_info "Creating Service"
cat <<'EOF' >/etc/systemd/system/prometheus.service
[Unit]
Description=Prometheus
Wants=network-online.target
After=network-online.target
[Service]
User=root
Restart=always
Type=simple
ExecStart=/usr/local/bin/prometheus \
--config.file=/etc/prometheus/prometheus.yml \
--storage.tsdb.path=/var/lib/prometheus/ \
--web.listen-address=0.0.0.0:9090
ExecReload=/bin/kill -HUP $MAINPID
[Service]
User=root
Restart=always
Type=simple
ExecStart=/usr/local/bin/prometheus \
--config.file=/etc/prometheus/prometheus.yml \
--storage.tsdb.path=/var/lib/prometheus/ \
--web.listen-address=0.0.0.0:9090
ExecReload=/bin/kill -HUP $MAINPID
[Install]
WantedBy=multi-user.target
EOF
systemctl enable -q --now prometheus
msg_ok "Created Service"
[Install]
WantedBy=multi-user.target
EOF
systemctl enable -q --now prometheus
msg_ok "Created Service"
}
setup_alpine() {
msg_info "Installing Prometheus"
$STD apk add --no-cache prometheus
msg_ok "Installed Prometheus"
msg_info "Enabling Prometheus Service"
$STD rc-update add prometheus default
msg_ok "Enabled Prometheus Service"
msg_info "Starting Prometheus"
$STD service prometheus start
msg_ok "Started Prometheus"
}
run_os_setup
motd_ssh
customize