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:
parent
c963f0c297
commit
ccdec71b5c
1 changed files with 1 additions and 1 deletions
|
@ -153,7 +153,7 @@ build_config() {
|
|||
config_foreach nut_upsmon_add master master
|
||||
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
|
||||
chmod 640 /var/etc/nut/nut.conf
|
||||
chgrp $(id -gn ${runas:-root}) /var/etc/nut/nut.conf
|
||||
|
|
Loading…
Reference in a new issue