mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-09-21 20:05:48 +02:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user