-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
changes to download script and first version of snmp service
- Loading branch information
1 parent
81d3cb2
commit 7f5cc3d
Showing
3 changed files
with
93 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
########################################################################### | ||
# systemd Service - Start/Stop Script for HCL Domino SNMP Agent # | ||
# Version 1.0.0 09.11.2023 # | ||
# # | ||
# (C) Copyright Daniel Nashed/NashCom 2023 # | ||
# Feedback domino_unix@nashcom.de # | ||
# # | ||
# Licensed under the Apache License, Version 2.0 (the "License"); # | ||
# you may not use this file except in compliance with the License. # | ||
# You may obtain a copy of the License at # | ||
# # | ||
# http://www.apache.org/licenses/LICENSE-2.0 # | ||
# # | ||
# Unless required by applicable law or agreed to in writing, software # | ||
# distributed under the License is distributed on an "AS IS" BASIS, # | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.# | ||
# See the License for the specific language governing permissions and # | ||
# limitations under the License. # | ||
########################################################################### | ||
|
||
[Unit] | ||
|
||
Description=HCL Domino SNMP Agent | ||
After=syslog.target network.target | ||
|
||
[Service] | ||
Type=forking | ||
ExecStart=/opt/hcl/domino/notes/latest/linux/lnsnmp -F | ||
|
||
[Install] | ||
WantedBy=multi-user.target | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
#!/bin/bash | ||
|
||
DOMINO_SNMP_SYSTEMD_NAME=dominosnmp | ||
DOMINO_SNMP_SYSTEMD_FILE=$DOMINO_SNMP_SYSTEMD_NAME.service | ||
DOMINO_SNMP_SYSTEMD_FILEPATH=/etc/systemd/system/$DOMINO_SNMP_SYSTEMD_FILE | ||
SNMPD_CONF=/etc/snmp/snmpd.conf | ||
|
||
|
||
log () | ||
{ | ||
echo | ||
echo "$@" | ||
echo | ||
} | ||
|
||
log_error() | ||
{ | ||
log "$@" | ||
exit 1 | ||
} | ||
|
||
|
||
if [ ! -e "$SNMPD_CONF" ]; then | ||
log_error "SNMP Agent not installed" | ||
fi | ||
|
||
if [ -n "$(grep "smuxpeer 1.3.6.1.4.1.334.72" "$SNMPD_CONF")" ]; then | ||
log "Domino SNMP settings already set in $SNMPD_CONF" | ||
|
||
else | ||
echo >> "$SNMPD_CONF" | ||
echo "# Allow HCL Domino SNMP SMUX (lnsnmp)" >> "$SNMPD_CONF" | ||
echo "smuxpeer 1.3.6.1.4.1.334.72 NotesPasswd" >> "$SNMPD_CONF" | ||
echo >> "$SNMPD_CONF" | ||
|
||
systemctl restart snmpd | ||
fi | ||
|
||
|
||
cp $DOMINO_SNMP_SYSTEMD_FILE $DOMINO_SNMP_SYSTEMD_FILEPATH | ||
chown root:root $DOMINO_SNMP_SYSTEMD_FILEPATH | ||
chmod 644 $DOMINO_SNMP_SYSTEMD_FILEPATH | ||
|
||
systemctl daemon-reload | ||
systemctl enable $DOMINO_SNMP_SYSTEMD_NAME | ||
|
||
log "Starting Domino SNMP agent..." | ||
|
||
systemctl restart $DOMINO_SNMP_SYSTEMD_NAME | ||
systemctl status $DOMINO_SNMP_SYSTEMD_NAME | ||
|
||
log "Note: Ensure that the quryset and intrcpt server tasks are started on your Domino server" | ||
|