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:
@@ -157,6 +157,11 @@ function run_prometheus_exporter() {
|
|||||||
crontab /tmp/cron_bkp
|
crontab /tmp/cron_bkp
|
||||||
rm /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"
|
echo "* STARTING Node Exporter"
|
||||||
node_exporter --collector.textfile.directory="$NODE_EXPORTER_DIR" &
|
node_exporter --collector.textfile.directory="$NODE_EXPORTER_DIR" &
|
||||||
sepurator
|
sepurator
|
||||||
@@ -183,4 +188,4 @@ run_install_script
|
|||||||
echo "* Init done! - Starting SSH-Daemon..."
|
echo "* Init done! - Starting SSH-Daemon..."
|
||||||
sepurator
|
sepurator
|
||||||
echo ""
|
echo ""
|
||||||
exec /usr/sbin/sshd -D -e "$@" 2> /logs/sshd.log
|
exec /usr/sbin/sshd -D -e "$@" 2> /var/log/sshd.log
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
DOCKER_IMAGE_VERSION="2.0.0"
|
DOCKER_IMAGE_VERSION="2.0.0"
|
||||||
BORG_VERSION=$(borg -V)
|
BORG_VERSION=$(borg -V)
|
||||||
SSH_FOLDERS=( "/sshkeys/clients" "/sshkeys/host" )
|
SSH_FOLDERS=( "/sshkeys/clients" "/sshkeys/host" )
|
||||||
NODE_EXPORTER_DIR="/logs"
|
NODE_EXPORTER_DIR="/var/log"
|
||||||
COLUMNS="86"
|
COLUMNS="86"
|
||||||
##############################################################################################################################
|
##############################################################################################################################
|
||||||
# Funktionen
|
# Funktionen
|
||||||
|
|||||||
Reference in New Issue
Block a user