Unbound - fixing extend line and adding notes step
This commit is contained in:
49
seqs/snmp.sh
49
seqs/snmp.sh
@@ -443,7 +443,7 @@ step_44() {
|
||||
exe chmod +x "$locExtLoc"
|
||||
|
||||
echoseq " [I] Create extend for $locExtName"
|
||||
addConf -a "extend /usr/bin/sudo $locExtName ${locExtLoc}" "$toolConfig"
|
||||
addConf -a "extend $locExtName /usr/bin/sudo ${locExtLoc}" "$toolConfig"
|
||||
|
||||
echoseq " [I] Create config for $locExtName"
|
||||
addConf -s "$unboundExtendConfig" "$unboundExtendConfigLoc"
|
||||
@@ -471,6 +471,53 @@ step_45() {
|
||||
unboundSudoerLoc="/etc/sudoers.d/snmpunbound"
|
||||
unboundSudoer="Debian-snmp ALL=(ALL) NOPASSWD: /usr/sbin/unbound-control, ${toolConfigLoc}/unbound"
|
||||
|
||||
step_100_info() { echo "Notes"; }
|
||||
step_100_alias() { ALIAS="notes"; }
|
||||
step_100() {
|
||||
outColor green
|
||||
cat <<NOTES_END
|
||||
# Reduce log level of snmpd
|
||||
|
||||
systemctl edit snmpd.service
|
||||
|
||||
[Service]
|
||||
ExecStart=
|
||||
ExecStart=/usr/sbin/snmpd -LSwd -Lf /dev/null -u Debian-snmp -g Debian-snmp -I -smux,mteTrigger,mteTriggerConf -f -p /run/snmpd.pid
|
||||
|
||||
## Extract of loggin options from man page
|
||||
|
||||
LOGGING OPTIONS
|
||||
The mechanism and destination to use for logging of warning and error messages can be controlled by passing various parameters to the -L flag.
|
||||
|
||||
-Le
|
||||
Log messages to the standard error stream.
|
||||
-Lf FILE
|
||||
Log messages to the specified file.
|
||||
-Lo
|
||||
Log messages to the standard output stream.
|
||||
-Ls FACILITY
|
||||
Log messages via syslog, using the specified facility ('d' for LOG_DAEMON, 'u' for LOG_USER, or '0'-'7' for LOG_LOCAL0 through LOG_LOCAL7).
|
||||
|
||||
There are also "upper case" versions of each of these options, which allow the corresponding logging mechanism to be restricted to certain priorities of message. Using standard error logging as an example:
|
||||
|
||||
-LE pri
|
||||
will log messages of priority 'pri' and above to standard error.
|
||||
-LE p1-p2
|
||||
will log messages with priority between 'p1' and 'p2' (inclusive) to standard error.
|
||||
|
||||
For -LF and -LS the priority specification comes before the file or facility token. The priorities recognised are:
|
||||
|
||||
0 or ! for LOG_EMERG,
|
||||
1 or a for LOG_ALERT,
|
||||
2 or c for LOG_CRIT,
|
||||
3 or e for LOG_ERR,
|
||||
4 or w for LOG_WARNING,
|
||||
5 or n for LOG_NOTICE,
|
||||
6 or i for LOG_INFO, and
|
||||
7 or d for LOG_DEBUG.
|
||||
|
||||
NOTES_END
|
||||
}
|
||||
|
||||
checkExtend() {
|
||||
# adding dry run output for clarification
|
||||
|
Reference in New Issue
Block a user