mirror of
https://github.com/novatiq/packages.git
synced 2026-04-30 07:28:39 +01:00
nut: Fix bad check for conf exists
We were `cat`ing the file instead of just checking for non-empty existance. Fix that. Signed-off-by: Daniel F. Dickinson <cshored@thecshore.com>
This commit is contained in:
@@ -153,7 +153,7 @@ build_config() {
|
|||||||
config_foreach nut_upsmon_add master master
|
config_foreach nut_upsmon_add master master
|
||||||
config_foreach nut_upsmon_add slave slave
|
config_foreach nut_upsmon_add slave slave
|
||||||
|
|
||||||
[ ! -s "$(cat /var/etc/nut/nut.conf)" ] && {
|
[ ! -s /var/etc/nut/nut.conf ] && {
|
||||||
echo "MODE=netclient" >>/var/etc/nut/nut.conf
|
echo "MODE=netclient" >>/var/etc/nut/nut.conf
|
||||||
chmod 640 /var/etc/nut/nut.conf
|
chmod 640 /var/etc/nut/nut.conf
|
||||||
chgrp $(id -gn ${runas:-root}) /var/etc/nut/nut.conf
|
chgrp $(id -gn ${runas:-root}) /var/etc/nut/nut.conf
|
||||||
|
|||||||
Reference in New Issue
Block a user