From 301150347ccf9052369bb9eb4bdd62c4a2f54ff2 Mon Sep 17 00:00:00 2001 From: Orsiris de Jong Date: Mon, 11 Nov 2024 11:08:53 +0100 Subject: [PATCH] Add default config file --- install.sh | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/install.sh b/install.sh index de7f637..5216d55 100644 --- a/install.sh +++ b/install.sh @@ -48,7 +48,7 @@ Type=simple # You may prefer to use a different user or group on your system. #User=grommunio #Group=grommunio -ExecStart=/usr/bin/grommunio_exporter +ExecStart=/usr/bin/grommunio_exporter -c /etc/grommunio_exporter.yaml Restart=always RestartSec=60 @@ -57,6 +57,24 @@ WantedBy=multi-user.target EOF [ $? -eq 0 ] || log "Failed to setup systemd unit file" "ERROR" +cat << 'EOF' > /etc/grommunio_exporter.yaml +http_server: + port: 9799 + listen: 0.0.0.0 + log_file: /var/log/grommunio_exporter.log + # Optional api authentication + no_auth: true + username: + password: +grommunio: + # Optional overrides + cli_binary: /usr/sbin/grommunio-admin + # concurrent api calls, defaults to 4 + api_concurrency: + alternative_hostname: +EOF +[ $? -eq 0 ] || log "Failed to setup grommunio_exporter config file" "ERROR" + systemctl enable grommunio_exporter || log "Cannot enable grommunio_exporter service" "ERROR" systemctl start grommunio_exporter || log_quit "Cannot start grommunio_exporter service"