summaryrefslogtreecommitdiffstats
path: root/satellit_installer/includes/60-setup_logging.inc
blob: 4b98a09b68a121cd79a253e93ad028514cc0ba8e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
setup_logging() {
	echo -n "# Setting up logging for dmsd, and taskmanager (to /var/log/xxxx)... "
	cp "$BASEDIR/static_files/logging"/80-dmsd.conf \
	   "$BASEDIR/static_files/logging"/90-taskmanager.conf /etc/rsyslog.d/
	cp "$BASEDIR/static_files/logging"/satellite-logrotate /etc/logrotate.d/
	echo "ok."

	echo -n "# Restarting rsyslogd... "
	[ "$SYSTEMD" ] && systemctl restart rsyslog >/dev/null || /etc/init.d/rsyslog restart >/dev/null
	ERR=$?
	if [ "$ERR" -ne 0 ]; then
		echo
		echo "# Could not restart rsyslog correctly - error number $ERR!"
		# Fehlerbehandlung?
	else
		echo "ok."
	fi
}