move logs to /var/log and run borg exporter on startup if borg_exporter.prom is not into /var/log

This commit is contained in:
2022-11-26 12:47:49 +01:00
parent 5b30848e82
commit 664da2b92d
2 changed files with 7 additions and 2 deletions
+6 -1
View File
@@ -157,6 +157,11 @@ function run_prometheus_exporter() {
crontab /tmp/cron_bkp
rm /tmp/cron_bkp
if [ ! -f "/var/log/borg_exporter.prom" ]; then
echo "* Export Borg Backup Data for Node Exporter"
/usr/local/bin/borg_exporter.sh
fi
echo "* STARTING Node Exporter"
node_exporter --collector.textfile.directory="$NODE_EXPORTER_DIR" &
sepurator
@@ -183,4 +188,4 @@ run_install_script
echo "* Init done! - Starting SSH-Daemon..."
sepurator
echo ""
exec /usr/sbin/sshd -D -e "$@" 2> /logs/sshd.log
exec /usr/sbin/sshd -D -e "$@" 2> /var/log/sshd.log