mirror of
https://github.com/nextcloud/nextcloudpi.git
synced 2026-01-09 14:42:01 -03:30
metrics.sh: Prevent unbound variable when reloading metrics config
This commit is contained in:
parent
baae501f3c
commit
ca7fc4d7cf
@ -27,6 +27,7 @@ tmpl_metrics_enabled() {
|
||||
}
|
||||
|
||||
reload_metrics_config() {
|
||||
set +u
|
||||
is_supported || return 0
|
||||
|
||||
install_template ncp-metrics.cfg.sh "/usr/local/etc/ncp-metrics.cfg" || {
|
||||
@ -48,7 +49,7 @@ metrics_services() {
|
||||
|
||||
if [[ "$cmd" =~ (start|stop|restart|reload|status) ]]
|
||||
then
|
||||
if ! is_docker && ! [[ -d /run/systemd/system ]]
|
||||
if ! is_docker && ! [[ -d /run/systemd/system ]]
|
||||
then
|
||||
echo "Probably running in chroot. Ignoring 'metrics_services $cmd'..."
|
||||
return 0
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user