mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-07-28 16:52:55 +02:00
Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 99e19c8ef6 | |||
| 920bab7068 | |||
| 57e02eee1b | |||
| 45053ea4c3 |
@@ -514,6 +514,7 @@ Exercise vigilance regarding copycat or coat-tailing sites that seek to exploit
|
||||
|
||||
- #### 🐞 Bug Fixes
|
||||
|
||||
- fix Node.js version drift [@asylumexp](https://github.com/asylumexp) ([#16111](https://github.com/community-scripts/ProxmoxVE/pull/16111))
|
||||
- UmlautAdaptarr: use the Debian 13 Microsoft repo with its 2025 signing key [@angusmaul](https://github.com/angusmaul) ([#16077](https://github.com/community-scripts/ProxmoxVE/pull/16077))
|
||||
- fix(bazarr): store data in /var/lib/bazarr instead of inside /opt/bazarr [@angusmaul](https://github.com/angusmaul) ([#16098](https://github.com/community-scripts/ProxmoxVE/pull/16098))
|
||||
- Cloudflare-DDNS: store API token in a 600 env file and build the binary at install time [@angusmaul](https://github.com/angusmaul) ([#16100](https://github.com/community-scripts/ProxmoxVE/pull/16100))
|
||||
|
||||
@@ -35,6 +35,32 @@ if ! grep -qE 'ID=debian|ID=ubuntu' /etc/os-release 2>/dev/null; then
|
||||
exit 238
|
||||
fi
|
||||
|
||||
# ==============================================================================
|
||||
# SERVICE FILE
|
||||
# ==============================================================================
|
||||
function write_service() {
|
||||
cat <<EOF >"$SERVICE_PATH"
|
||||
[Unit]
|
||||
Description=Prometheus Paperless NGX Exporter
|
||||
Wants=network-online.target
|
||||
After=network-online.target
|
||||
|
||||
[Service]
|
||||
User=root
|
||||
EnvironmentFile=$CONFIG_PATH
|
||||
ExecStart=$BINARY_PATH \\
|
||||
--paperless_url=\${PAPERLESS_URL} \\
|
||||
--paperless_auth_token_file=$AUTH_TOKEN_FILE \\
|
||||
--paperless_header 'Accept: application/json; version=9' \\
|
||||
--collectors=tag,correspondent,document_type,storage_path,task,log,group,user,status,statistics
|
||||
Restart=always
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
systemctl daemon-reload
|
||||
}
|
||||
|
||||
# ==============================================================================
|
||||
# UNINSTALL
|
||||
# ==============================================================================
|
||||
@@ -57,19 +83,31 @@ function uninstall() {
|
||||
# UPDATE
|
||||
# ==============================================================================
|
||||
function update() {
|
||||
local release_found=1
|
||||
|
||||
if check_for_gh_release "prom-paperless-exp" "hansmi/prometheus-paperless-exporter"; then
|
||||
release_found=0
|
||||
msg_info "Stopping service"
|
||||
systemctl stop prometheus-paperless-ngx-exporter
|
||||
msg_ok "Stopped service"
|
||||
|
||||
fetch_and_deploy_gh_release "prom-paperless-exp" "hansmi/prometheus-paperless-exporter" "binary" "latest"
|
||||
|
||||
msg_info "Starting service"
|
||||
systemctl start prometheus-paperless-ngx-exporter
|
||||
msg_ok "Started service"
|
||||
msg_ok "Updated successfully!"
|
||||
exit
|
||||
fi
|
||||
|
||||
msg_info "Refreshing service configuration"
|
||||
write_service
|
||||
msg_ok "Refreshed service configuration"
|
||||
|
||||
msg_info "Starting service"
|
||||
systemctl restart prometheus-paperless-ngx-exporter
|
||||
msg_ok "Started service"
|
||||
|
||||
if [[ $release_found -eq 0 ]]; then
|
||||
msg_ok "Updated successfully!"
|
||||
else
|
||||
msg_ok "No new release found, service configuration refreshed"
|
||||
fi
|
||||
exit
|
||||
}
|
||||
|
||||
# ==============================================================================
|
||||
@@ -93,24 +131,7 @@ EOF
|
||||
msg_ok "Created configuration"
|
||||
|
||||
msg_info "Creating service"
|
||||
cat <<EOF >"$SERVICE_PATH"
|
||||
[Unit]
|
||||
Description=Prometheus Paperless NGX Exporter
|
||||
Wants=network-online.target
|
||||
After=network-online.target
|
||||
|
||||
[Service]
|
||||
User=root
|
||||
EnvironmentFile=$CONFIG_PATH
|
||||
ExecStart=$BINARY_PATH \\
|
||||
--paperless_url=\${PAPERLESS_URL} \\
|
||||
--paperless_auth_token_file=$AUTH_TOKEN_FILE
|
||||
Restart=always
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
systemctl daemon-reload
|
||||
write_service
|
||||
systemctl enable -q --now prometheus-paperless-ngx-exporter
|
||||
msg_ok "Created and started service"
|
||||
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
__ __ __ __ __ __ __ __
|
||||
____ ______/ /___ ______ _/ / / /_ __ ______/ /___ ____ / /_ ____ _________ ____ ___ ___ / /_/ /_ ___ __ _______ ___ _ ______ ____ _____/ /____ _____
|
||||
/ __ `/ ___/ __/ / / / __ `/ /_____/ __ \/ / / / __ / __ `/ _ \/ __/_____/ __ \/ ___/ __ \/ __ `__ \/ _ \/ __/ __ \/ _ \/ / / / ___/_____/ _ \| |/_/ __ \/ __ \/ ___/ __/ _ \/ ___/
|
||||
/ /_/ / /__/ /_/ /_/ / /_/ / /_____/ /_/ / /_/ / /_/ / /_/ / __/ /_/_____/ /_/ / / / /_/ / / / / / / __/ /_/ / / / __/ /_/ (__ )_____/ __/> </ /_/ / /_/ / / / /_/ __/ /
|
||||
\__,_/\___/\__/\__,_/\__,_/_/ /_.___/\__,_/\__,_/\__, /\___/\__/ / .___/_/ \____/_/ /_/ /_/\___/\__/_/ /_/\___/\__,_/____/ \___/_/|_/ .___/\____/_/ \__/\___/_/
|
||||
/____/ /_/ /_/
|
||||
Reference in New Issue
Block a user