added file dependency check, switched back to english, smaller fix and improvements

This commit is contained in:
fatalerrors
2021-11-18 14:53:11 +01:00
parent 9fc9b96165
commit b71a0c2ee8
21 changed files with 360 additions and 173 deletions

View File

@@ -7,20 +7,29 @@
# The complete license agreement can be obtained at:
# https://opensource.org/licenses/BSD-3-Clause
# ------------------------------------------------------------------------------
# Variables:
# * SYSLOG_SRV: the syslog server name
# ------------------------------------------------------------------------------
export VER_conf_syslog="0.0.1"
export VER_conf_syslog="0.0.2"
conf_syslog()
{
prnt I "Configuration de rsyslog..."
backupdist /etc/rsyslog.conf
installfile rsyslog.conf /etc/rsyslog.conf
sed -i -e "s/@SYSLOG_SRV@/$SYSLOG_SRV/" /etc/rsyslog.conf
svc_restart rsyslog
}
precheck_conf_syslog()
{
: # Nothing to check
if [[ -z $SYSLOG_SRV ]]; then
prnt E "Undeclared syslog server name !"
die 181
else
file_exists rsyslog.conf
fi
}
export -f conf_syslog