mirror of
https://github.com/coolsnowwolf/packages.git
synced 2025-05-02 14:21:24 +08:00
14 lines
372 B
Bash
Executable File
14 lines
372 B
Bash
Executable File
#!/bin/sh
|
|
|
|
[ -e /etc/config/prometheus ] || touch /etc/config/prometheus
|
|
|
|
uci -q get prometheus.prometheus || {
|
|
uci -q batch <<EOF
|
|
set prometheus.prometheus=prometheus
|
|
set prometheus.prometheus.config_file='/etc/prometheus.yml'
|
|
set prometheus.prometheus.storage_tsdb_path='/data'
|
|
set prometheus.prometheus.web_listen_address='127.0.0.1:9090'
|
|
commit prometheus
|
|
EOF
|
|
}
|