Fix local snmpd community string setup (#17363)

snmpd sed placement for community string is using the wrong variable RANDOMSTRINGHERE need to be RANDOMSTRINGGOESHERE
This commit is contained in:
Dopch
2026-09-21 14:54:02 +02:00
committed by GitHub
parent a6cd257253
commit 2e5df311e6
+1 -1
View File
@@ -129,7 +129,7 @@ $STD su - librenms -s /bin/bash -c "cd /opt/librenms && lnms db:seed --force"
$STD su - librenms -s /bin/bash -c "cd /opt/librenms && lnms user:add -p ${APP_PASSWORD} ${APP_USER} --role=admin"
RANDOM_STRING=$(openssl rand -base64 16 | tr -dc 'a-zA-Z0-9')
sed -i "s/RANDOMSTRINGHERE/$RANDOM_STRING/g" /etc/snmp/snmpd.conf
sed -i "s/RANDOMSTRINGGOESHERE/$RANDOM_STRING/g" /etc/snmp/snmpd.conf
echo "SNMP Community String: $RANDOM_STRING" >>~/librenms.creds
curl -qso /usr/bin/distro https://raw.githubusercontent.com/librenms/librenms-agent/master/snmp/distro
chmod +x /usr/bin/distro