From 7c1de021b481ac43c2b0e9ef4567c5c529a4d382 Mon Sep 17 00:00:00 2001 From: "Alain Spaite (Domspaite)" Date: Mon, 8 Jun 2015 11:37:31 +0200 Subject: [PATCH] Initial Import --- .SRCINFO | 15 ++++++++++++ PKGBUILD | 52 ++++++++++++++++++++++++++++++++++++++++ fingbox-sentinel.script | 45 ++++++++++++++++++++++++++++++++++ fingbox-sentinel.service | 14 +++++++++++ 4 files changed, 126 insertions(+) create mode 100644 .SRCINFO create mode 100644 PKGBUILD create mode 100755 fingbox-sentinel.script create mode 100755 fingbox-sentinel.service diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 0000000..2f2be0a --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,15 @@ +pkgbase = overlook-fing + pkgdesc = The ultimate tool for network discovery and scanning + pkgver = 2.2 + pkgrel = 3 + url = http://www.overlooksoft.com/ + arch = i686 + arch = x86_64 + license = custom:Overlook Freeware license + depends = boost-libs + depends = openssl + depends = zlib + options = !strip + +pkgname = overlook-fing + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 0000000..521b3a9 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,52 @@ +# Contributor: Piotr Rogoża +# Created: 08/12/2010 +# Maintainer: Salan54 +# Modified: 05/16/2013 +pkgname=overlook-fing +pkgver=2.2 +pkgrel=3 +_altpkgname=fing +pkgdesc='The ultimate tool for network discovery and scanning' +arch=('i686' 'x86_64') +url='http://www.overlooksoft.com/' +license=('custom:Overlook Freeware license') +depends=('boost-libs' 'openssl' 'zlib') +options=(!strip) +case $CARCH in + i686) + source=("${pkgname}-${pkgver}.tgz::http://www.overlooksoft.com/packages/linux32/${pkgname}-${pkgver}.tgz" + "fingbox-sentinel.service" + "fingbox-sentinel.script" + ) + md5sums=('fa523c841daa6963fda51a32b5972bcd' '013488a7afe3048524df6b7527faae69' '95dbef149b9d3a9ea3bac0bd0c77b343') + ;; + x86_64) + source=("${pkgname}-${pkgver}.tgz::http://www.overlooksoft.com/packages/linux64/${pkgname}-${pkgver}.tgz" + "fingbox-sentinel.service" + "fingbox-sentinel.script" + ) + md5sums=('3e599f665442631657ebc8bef74d98e1' '013488a7afe3048524df6b7527faae69' '95dbef149b9d3a9ea3bac0bd0c77b343') + ;; +esac + +package() { + cd "$srcdir" + cp -r usr $pkgdir/ + install -dm755 "${pkgdir}"/etc/${_altpkgname} + install -dm755 "${pkgdir}"/var/data/${_altpkgname}/{box,sentinel} + install -dm755 "${pkgdir}"/var/log/${_altpkgname} + + install -Dm644 ./usr/share/${_altpkgname}/template/conf/sentinel.txt "${pkgdir}"/var/data/${_altpkgname}/sentinel/ + install -Dm644 ./usr/share/${_altpkgname}/template/conf/*.properties "${pkgdir}"/etc/${_altpkgname}/ + + # systemd & fingbox-sentinel + install -Dm755 fingbox-sentinel.service "${pkgdir}"/usr/lib/systemd/system/fingbox-sentinel.service + install -Dm755 fingbox-sentinel.script "${pkgdir}"/usr/lib/systemd/scripts/fingbox-sentinel + + # license + install -dm755 "${pkgdir}"/usr/share/licenses/${_altpkgname} + ln -s /usr/share/${_altpkgname}/doc/license.txt "${pkgdir}"/usr/share/licenses/${_altpkgname}/license +} + +# vim:set ts=2 sw=2 et ft=sh tw=100: + diff --git a/fingbox-sentinel.script b/fingbox-sentinel.script new file mode 100755 index 0000000..a2befed --- /dev/null +++ b/fingbox-sentinel.script @@ -0,0 +1,45 @@ +#!/usr/bin/env bash +# +# Copyright 2012 by Overlook +# description: Fingbox Sentinel +# + +# Start the service +start() { + echo -n "Starting fingbox-sentinel: " + export LD_LIBRARY_PATH="/usr/lib/fing" + export DYLD_LIBRARY_PATH=$LD_LIBRARY_PATH + ulimit -n 1024 + ulimit -c 0 + nohup /usr/lib/fing/fing.bin --sentinel >/dev/null 2>/dev/null & + echo $! > /run/fingbox-sentinel.pid + ### Create the lock file ### + touch /run/lock/subsys/fingbox-sentinel + #success $"fingbox-sentinel startup" + #echo +} +# Stop the service +stop() { + echo -n "Stopping fingbox-sentinel: " + killall fingbox-sentinel + ### Now, delete the lock file ### + rm -f /run/lock/subsys/fingbox-sentinel +} +### main logic ### +case "$1" in + start) + start + ;; + stop) + stop + ;; + restart|reload) + stop + start + ;; + *) + echo $"Usage: $0 {start|stop|restart|reload}" + exit 1 +esac +exit 0 + diff --git a/fingbox-sentinel.service b/fingbox-sentinel.service new file mode 100755 index 0000000..5978c3b --- /dev/null +++ b/fingbox-sentinel.service @@ -0,0 +1,14 @@ +[Unit] +Description=Fingbox Sentinel +After=syslog.target network.target + +[Service] +Type=forking +PIDFile=/run/fingbox-sentinel.pid +ExecStart=/usr/lib/systemd/scripts/fingbox-sentinel start +ExecStop=/usr/lib/systemd/scripts/fingbox-sentinel stop +ExecReload=/usr/lib/systemd/scripts/fingbox-sentinel restart + +[Install] +WantedBy=multi-user.target +