improved code quality, few bug fixes

This commit is contained in:
Geoffray Levasseur
2023-08-02 11:36:01 +02:00
parent e16ce485f9
commit cd35f52509
29 changed files with 174 additions and 168 deletions

View File

@@ -38,15 +38,15 @@ conf_ntp()
prnt I "Installing NTP configuration file..."
local dest="${conf_file}.work"
backup_dist $conf_file
install_file ntp.conf $dest
tag_file $dest
backup_dist "$conf_file"
install_file ntp.conf "$dest"
tag_file "$dest"
local line=""
for srv in $NTP_SERVERS; do
line="${line}server $srv iburst\n"
done
sed -i -e "s/@SERVERLIST@/$line/" $dest &&
mv -fv $dest $conf_file
sed -i -e "s/@SERVERLIST@/$line/" "$dest" &&
mv -fv "$dest" "$conf_file"
prnt I "Starting service ntp..."