feat: add Nezha and Shiori installation scripts and JSON configurations
This commit is contained in:
48
install/nezha-install.sh
Normal file
48
install/nezha-install.sh
Normal file
@@ -0,0 +1,48 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Copyright (c) 2021-2026 community-scripts ORG
|
||||
# Author: GitHub Copilot (GPT-5.3-Codex)
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE
|
||||
# Source: https://github.com/nezhahq/nezha
|
||||
|
||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||
color
|
||||
verb_ip6
|
||||
catch_errors
|
||||
setting_up_container
|
||||
network_check
|
||||
update_os
|
||||
|
||||
fetch_and_deploy_gh_release "nezha" "nezhahq/nezha" "prebuild" "latest" "/opt/nezha" "dashboard-linux-amd64.zip"
|
||||
|
||||
msg_info "Preparing Application Files"
|
||||
if [[ -f /opt/nezha/dashboard-linux-amd64 ]]; then
|
||||
mv /opt/nezha/dashboard-linux-amd64 /opt/nezha/dashboard
|
||||
fi
|
||||
chmod +x /opt/nezha/dashboard
|
||||
mkdir -p /opt/nezha/data
|
||||
msg_ok "Prepared Application Files"
|
||||
|
||||
msg_info "Creating Service"
|
||||
cat <<EOF >/etc/systemd/system/nezha.service
|
||||
[Unit]
|
||||
Description=Nezha Monitoring Dashboard
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
User=root
|
||||
WorkingDirectory=/opt/nezha
|
||||
ExecStart=/opt/nezha/dashboard
|
||||
Restart=on-failure
|
||||
RestartSec=5
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
systemctl enable -q --now nezha
|
||||
msg_ok "Created Service"
|
||||
|
||||
motd_ssh
|
||||
customize
|
||||
cleanup_lxc
|
||||
52
install/shiori-install.sh
Normal file
52
install/shiori-install.sh
Normal file
@@ -0,0 +1,52 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Copyright (c) 2021-2026 community-scripts ORG
|
||||
# Author: GitHub Copilot (GPT-5.3-Codex)
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE
|
||||
# Source: https://github.com/go-shiori/shiori
|
||||
|
||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||
color
|
||||
verb_ip6
|
||||
catch_errors
|
||||
setting_up_container
|
||||
network_check
|
||||
update_os
|
||||
|
||||
fetch_and_deploy_gh_release "shiori" "go-shiori/shiori" "prebuild" "latest" "/opt/shiori" "*Linux_x86_64.tar.gz"
|
||||
|
||||
msg_info "Configuring Shiori"
|
||||
mkdir -p /opt/shiori/data
|
||||
SECRET_KEY=$(tr -d '-' </proc/sys/kernel/random/uuid)
|
||||
cat <<EOF >/opt/shiori/.env
|
||||
SHIORI_DIR=/opt/shiori/data
|
||||
SHIORI_HTTP_PORT=8080
|
||||
SHIORI_HTTP_ADDRESS=0.0.0.0:
|
||||
SHIORI_HTTP_SECRET_KEY=${SECRET_KEY}
|
||||
EOF
|
||||
msg_ok "Configured Shiori"
|
||||
|
||||
msg_info "Creating Service"
|
||||
cat <<EOF >/etc/systemd/system/shiori.service
|
||||
[Unit]
|
||||
Description=Shiori Bookmark Manager
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
User=root
|
||||
WorkingDirectory=/opt/shiori
|
||||
EnvironmentFile=/opt/shiori/.env
|
||||
ExecStart=/opt/shiori/shiori server
|
||||
Restart=on-failure
|
||||
RestartSec=5
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
systemctl enable -q --now shiori
|
||||
msg_ok "Created Service"
|
||||
|
||||
motd_ssh
|
||||
customize
|
||||
cleanup_lxc
|
||||
Reference in New Issue
Block a user