parent
e1faf06974
commit
d4d3f61673
|
@ -25,8 +25,13 @@ function install_chkconfig {
|
||||||
}
|
}
|
||||||
|
|
||||||
id telegraf &>/dev/null
|
id telegraf &>/dev/null
|
||||||
|
if [[ $? -ne 0 ]]; then
|
||||||
|
grep "^telegraf:" /etc/group &>/dev/null
|
||||||
if [[ $? -ne 0 ]]; then
|
if [[ $? -ne 0 ]]; then
|
||||||
useradd -r -K USERGROUPS_ENAB=yes -M telegraf -s /bin/false -d /etc/telegraf
|
useradd -r -K USERGROUPS_ENAB=yes -M telegraf -s /bin/false -d /etc/telegraf
|
||||||
|
else
|
||||||
|
useradd -r -K USERGROUPS_ENAB=yes -M telegraf -s /bin/false -d /etc/telegraf -g telegraf
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
test -d $LOG_DIR || mkdir -p $LOG_DIR
|
test -d $LOG_DIR || mkdir -p $LOG_DIR
|
||||||
|
|
Loading…
Reference in New Issue