zabbix_agent: Ensure that the user exists on all systems
authorMichael Tremer <michael.tremer@ipfire.org>
Fri, 8 Mar 2019 09:58:56 +0000 (09:58 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Fri, 8 Mar 2019 09:58:56 +0000 (09:58 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/paks/zabbix_agentd/install.sh

index ebbb62d..e1450a1 100644 (file)
 #
 . /opt/pakfire/lib/functions.sh
 
+if ! getent group zabbix &>/dev/null; then
+       groupadd -g 118 zabbix
+fi
+
+if ! getent passwd zabbix; then
+       useradd -u 118 -g zabbix -d /var/empty -s /bin/false zabbix
+fi
+
 extract_files
 
 # Create symlinks for runlevel interaction.