diff options
-rw-r--r-- | .INSTALL | 69 | ||||
-rw-r--r-- | .SRCINFO | 30 | ||||
-rw-r--r-- | PKGBUILD | 45 |
3 files changed, 144 insertions, 0 deletions
diff --git a/.INSTALL b/.INSTALL new file mode 100644 index 000000000000..1e243b90d0ed --- /dev/null +++ b/.INSTALL @@ -0,0 +1,69 @@ +pre_install() { + if [ "$1" = "upgrade" ] ; then + if [ -f /usr/rmmagent/hacker_patterns ] ; then + mv /usr/rmmagent/hacker_patterns /usr/rmmagent/hacker_patterns.old || echo "Tried to preserve hacker_patterns" + fi + fi +} + +post_install() { + if [ "$1" = "configure" ] ; then + ldconfig + if [ ! -f /usr/bin/service -a ! -f /usr/bin/service -a ! -f /usr/bin/service -a ! -f /usr/bin/service ] + then + cp /usr/rmmagent/service /usr/sbin || echo "Tried to copy service to /usr/sbin" + chmod 755 /usr/bin/service || echo "Tried to change rights for /usr/bin/service" + fi + rm -f /usr/rmmagent/service || echo "Tried to remove service script" + + if ! [ -f /usr/rmmagent/hacker_patterns_custom ] ; then + touch /usr/rmmagent/hacker_patterns_custom || echo "Tried to create hacker_patterns_custom" + fi + fi + echo "[Unit]" >> /etc/systemd/system/rmmagentd.service + echo "Description=Languard Remote Management Agent" >> /etc/systemd/system/rmmagentd.service + echo "" >> /etc/systemd/system/rmmagentd.service + echo "[Service]" >> /etc/systemd/system/rmmagentd.service + echo "Type=forking" >> /etc/systemd/system/rmmagentd.service + echo "TimeoutStartSec=0" >> /etc/systemd/system/rmmagentd.service + echo "ExecStart=/usr/rmmagent/rmmagentd --start" >> /etc/systemd/system/rmmagentd.service + echo "ExecStop=/usr/rmmagent/rmmagentd --terminate" >> /etc/systemd/system/rmmagentd.service + echo "" >> /etc/systemd/system/rmmagentd.service + echo "[Install]" >> /etc/systemd/system/rmmagentd.service + echo "WantedBy=multi-user.target" >> /etc/systemd/system/rmmagentd.service + echo "" + echo "To register this server in the dashboard please run '# /usr/rmmagent/rmmagentd -i'" + echo "" + echo "When asked if you want to start the agent during setup, choose 'No' then" + echo "enable and start the rmmagentd service to begin monitoring and data submission." +} + +pre_upgrade() { + pre_install +} + +post_upgrade() { + post_install +} + +pre_remove() { + if [ "$1" = "remove" ] ; then + /usr/rmmagent/rmmagentd -u || echo "not installed" + fi + systemctl disable rmmagentd + systemctl stop rmmagentd +} + +post_remove() { + if [ "$1" = "remove" ] ; then + rm -rf /usr/rmmagent || echo "removed." + fi + if [ "$1" = "upgrade" ] ; then + if pgrep rmmagentd > /dev/null + then + /usr/rmmagent/rmmagentd -r || echo "Tried to restart agent daemon" + fi + fi + rm -f /etc/systemd/system/rmmagentd.service + rm -rf /usr/rmmagent +} diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..318e0435f659 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,30 @@ +pkgbase = rmmagent + pkgdesc = Remote Monitoring Agent for GFI Languard Dashboard + pkgver = 1.0.2.1 + pkgrel = 4 + url = http://languard.gfi.com/ + install = .INSTALL + arch = i686 + arch = x86_64 + license = custom + depends = ethtool + depends = smartmontools + depends = gcc-libs + depends = glibc + depends = openssl + depends = unzip + provides = rmmagent + options = !strip + source_i686 = http://repos.systemmonitor.us/rmmagent/Debian_7.0/i386/rmmagent_1.0.2-1_i386.deb + depends_i686 = ethtool + depends_i686 = smartmontools + depends_i686 = gcc-libs + depends_i686 = glibc + depends_i686 = openssl + depends_i686 = unzip + md5sums_i686 = 870236044d12b7aaa236fb4475b3d3b4 + source_x86_64 = http://repos.systemmonitor.us/rmmagent/Debian_7.0/amd64/rmmagent_1.0.2-1_amd64.deb + md5sums_x86_64 = ed1afc694402e151ed72241600c10200 + +pkgname = rmmagent + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..359c3f504809 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,45 @@ +# Maintainer: Sean Snell <ssnell at cmhsol dot com> + +pkgname=rmmagent +pkgver=1.0.2.1 +pkgrel=4 +pkgdesc='Remote Monitoring Agent for GFI Languard Dashboard' +arch=('i686' 'x86_64') +url='http://languard.gfi.com/' +license=('custom') +options=('!strip') +provides=('rmmagent') +depends_x86_64=( + 'ethtool' + 'smartmontools' + 'gcc-libs' + 'glibc' + 'openssl' + 'unzip') + +depends_i686=( + 'ethtool' + 'smartmontools' + 'gcc-libs' + 'glibc' + 'openssl' + 'unzip') + +install=.INSTALL +source_x86_64=("http://repos.systemmonitor.us/rmmagent/Debian_7.0/amd64/rmmagent_1.0.2-1_amd64.deb") +source_i686=("http://repos.systemmonitor.us/rmmagent/Debian_7.0/i386/rmmagent_1.0.2-1_i386.deb") + +md5sums_x86_64=('ed1afc694402e151ed72241600c10200') +md5sums_i686=('870236044d12b7aaa236fb4475b3d3b4') + +prepare() { + tar -xf data.tar.gz + tar -xf control.tar.gz + mv usr/local/lib/ usr/lib + mv usr/local/rmmagent usr/rmmagent +} + +package() { + # Install + cp -dr --no-preserve=ownership {etc,usr} "${pkgdir}"/ +} |