mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-29 05:36:47 +00:00
net-snmp: new addon
This commit is contained in:
parent
8f6f8614fe
commit
3390efbc80
3
packages/addons/service/net-snmp/changelog.txt
Normal file
3
packages/addons/service/net-snmp/changelog.txt
Normal file
@ -0,0 +1,3 @@
|
||||
100
|
||||
- Initial addon
|
||||
- net-snmp 5.7.3
|
BIN
packages/addons/service/net-snmp/icon/icon.png
Normal file
BIN
packages/addons/service/net-snmp/icon/icon.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 31 KiB |
68
packages/addons/service/net-snmp/package.mk
Normal file
68
packages/addons/service/net-snmp/package.mk
Normal file
@ -0,0 +1,68 @@
|
||||
################################################################################
|
||||
# This file is part of LibreELEC - https://libreelec.tv
|
||||
# Copyright (C) 2016 Team LibreELEC
|
||||
#
|
||||
# LibreELEC is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# LibreELEC is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with LibreELEC. If not, see <http://www.gnu.org/licenses/>.
|
||||
################################################################################
|
||||
|
||||
PKG_NAME="net-snmp"
|
||||
PKG_VERSION="5.7.3"
|
||||
PKG_REV="100"
|
||||
PKG_ARCH="any"
|
||||
PKG_LICENSE="BSD"
|
||||
PKG_SITE="http://www.net-snmp.org"
|
||||
PKG_URL="http://sourceforge.net/projects/net-snmp/files/$PKG_NAME/$PKG_VERSION/$PKG_NAME-$PKG_VERSION.tar.gz"
|
||||
PKG_DEPENDS_TARGET="toolchain"
|
||||
PKG_SECTION="service"
|
||||
PKG_SHORTDESC="Simple Network Management Protocol utilities."
|
||||
PKG_LONGDESC="Simple Network Management Protocol (SNMP) is a widely used protocol for monitoring the health and welfare of network equipment."
|
||||
PKG_AUTORECONF="yes"
|
||||
|
||||
PKG_IS_ADDON="yes"
|
||||
PKG_ADDON_NAME="Net-SNMP"
|
||||
PKG_ADDON_TYPE="xbmc.service"
|
||||
|
||||
PKG_CONFIGURE_OPTS_TARGET="--with-defaults \
|
||||
--disable-applications \
|
||||
--disable-manuals \
|
||||
--disable-debugging \
|
||||
--disable-deprecated \
|
||||
--disable-snmptrapd-subagent \
|
||||
--disable-perl-cc-checks \
|
||||
--with-perl-modules=no \
|
||||
--enable-mini-agent \
|
||||
--enable-static=no \
|
||||
--enable-shared=yes \
|
||||
--with-logfile=/storage/.kodi/userdata/addon_data/${PKG_ADDON_ID}/ \
|
||||
--with-persistent-directory=/storage/.kodi/userdata/addon_data/${PKG_ADDON_ID}/ \
|
||||
--disable-embedded-perl"
|
||||
|
||||
make_target() {
|
||||
make
|
||||
}
|
||||
|
||||
makeinstall_target() {
|
||||
make install INSTALL_PREFIX=$ROOT/$PKG_BUILD/.$TARGET_NAME
|
||||
}
|
||||
|
||||
addon() {
|
||||
mkdir -p $ADDON_BUILD/$PKG_ADDON_ID
|
||||
mv $PKG_BUILD/.$TARGET_NAME/usr/sbin/snmpd $PKG_BUILD/.$TARGET_NAME/usr/bin/snmpd
|
||||
rm -rf $PKG_BUILD/.$TARGET_NAME/usr/sbin/
|
||||
rm -rf $PKG_BUILD/.$TARGET_NAME/usr/include/
|
||||
cp -r $PKG_BUILD/.$TARGET_NAME/usr/* $ADDON_BUILD/$PKG_ADDON_ID/
|
||||
$STRIP $ADDON_BUILD/$PKG_ADDON_ID/lib/*.so
|
||||
$STRIP $ADDON_BUILD/$PKG_ADDON_ID/bin/snmpd
|
||||
}
|
||||
|
27
packages/addons/service/net-snmp/source/bin/snmpd.start
Normal file
27
packages/addons/service/net-snmp/source/bin/snmpd.start
Normal file
@ -0,0 +1,27 @@
|
||||
#!/bin/sh
|
||||
################################################################################
|
||||
# This file is part of LibreELEC - https://libreelec.tv
|
||||
# Copyright (C) 2016 Team LibreELEC
|
||||
#
|
||||
# LibreELEC is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# LibreELEC is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with LibreELEC. If not, see <http://www.gnu.org/licenses/>.
|
||||
################################################################################
|
||||
|
||||
. /etc/profile
|
||||
oe_setup_addon service.net-snmp
|
||||
|
||||
ADDON_ID=service.net-snmp
|
||||
ADDON_DIR="$HOME/.kodi/addons/$ADDON_ID"
|
||||
ADDON_HOME="$HOME/.kodi/userdata/addon_data/$ADDON_ID"
|
||||
|
||||
$ADDON_DIR/bin/snmpd -LS0-6d -c $ADDON_DIR/snmpd.conf -M /storage/.kodi/addons/service.net-snmp/share/snmp/mibs -p /var/run/snmpd.pid
|
28
packages/addons/service/net-snmp/source/bin/snmpd.stop
Normal file
28
packages/addons/service/net-snmp/source/bin/snmpd.stop
Normal file
@ -0,0 +1,28 @@
|
||||
#!/bin/sh
|
||||
################################################################################
|
||||
# This file is part of LibreELEC - https://libreelec.tv
|
||||
# Copyright (C) 2016 Team LibreELEC
|
||||
#
|
||||
# LibreELEC is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# LibreELEC is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with LibreELEC. If not, see <http://www.gnu.org/licenses/>.
|
||||
################################################################################
|
||||
|
||||
. /etc/profile
|
||||
oe_setup_addon service.net-snmp
|
||||
|
||||
ADDON_ID=service.net-snmp
|
||||
ADDON_DIR="$HOME/.kodi/addons/$ADDON_ID"
|
||||
ADDON_HOME="$HOME/.kodi/userdata/addon_data/$ADDON_ID"
|
||||
|
||||
PID=`cat /var/run/snmpd.pid`
|
||||
kill -TERM $PID
|
17
packages/addons/service/net-snmp/source/default.py
Normal file
17
packages/addons/service/net-snmp/source/default.py
Normal file
@ -0,0 +1,17 @@
|
||||
################################################################################
|
||||
# This file is part of LibreELEC - https://libreelec.tv
|
||||
# Copyright (C) 2016 Team LibreELEC
|
||||
#
|
||||
# LibreELEC is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# LibreELEC is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with LibreELEC. If not, see <http://www.gnu.org/licenses/>.
|
||||
################################################################################
|
10
packages/addons/service/net-snmp/source/snmpd.conf
Normal file
10
packages/addons/service/net-snmp/source/snmpd.conf
Normal file
@ -0,0 +1,10 @@
|
||||
com2sec local default libreelec
|
||||
group localgroup v2c local
|
||||
access localgroup "" any noauth exact all all none
|
||||
|
||||
view all included .1 80
|
||||
|
||||
syslocation HOME
|
||||
syscontact root@libreelec
|
||||
|
||||
dontLogTCPWrappersConnects yes
|
@ -0,0 +1,12 @@
|
||||
[Unit]
|
||||
Description=Net-SNMP software bundle
|
||||
After=network-online.target
|
||||
Requires=network-online.target
|
||||
|
||||
[Service]
|
||||
Type=forking
|
||||
ExecStart=/bin/sh -c "exec sh /storage/.kodi/addons/service.net-snmp/bin/snmpd.start"
|
||||
ExecStop=/bin/sh -c "exec sh /storage/.kodi/addons/service.net-snmp/bin/snmpd.stop"
|
||||
|
||||
[Install]
|
||||
WantedBy=kodi.target
|
Loading…
x
Reference in New Issue
Block a user