added file dependency check, switched back to english, smaller fix and improvements
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user