aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStuart Shelton <stuart@shelton.me>2017-09-27 06:36:03 +0100
committerStuart Shelton <stuart@shelton.me>2017-09-27 06:36:03 +0100
commitff82394fc9c1c600bfcff545d2c401ab7c3d74ac (patch)
tree52e305a9c3603e44a69fc9e06a5770349f8ba6c5 /net-analyzer
parentUpdate sys-apps/file-5.32 (diff)
downloadsrcshelton-ff82394fc9c1c600bfcff545d2c401ab7c3d74ac.tar.gz
srcshelton-ff82394fc9c1c600bfcff545d2c401ab7c3d74ac.tar.bz2
srcshelton-ff82394fc9c1c600bfcff545d2c401ab7c3d74ac.zip
Update file ntop-initd-r1, affecting net-analyzer/ntop
Diffstat (limited to 'net-analyzer')
-rw-r--r--net-analyzer/ntop/Manifest2
-rw-r--r--net-analyzer/ntop/files/ntop-initd-r160
2 files changed, 61 insertions, 1 deletions
diff --git a/net-analyzer/ntop/Manifest b/net-analyzer/ntop/Manifest
index 24b77f62..1b7bea26 100644
--- a/net-analyzer/ntop/Manifest
+++ b/net-analyzer/ntop/Manifest
@@ -3,7 +3,7 @@ AUX ntop-5.0.1-gentoo.patch 6752 SHA256 cece982d8670c471e38e8b65c85a131a8a6ede31
AUX ntop-5.0.1-includes.patch 388 SHA256 60429cc4920da2ec387baa08e2bde1c32e999d330c6e3f921544198efb84040a SHA512 6afe8aee2dfee0c9b778a11896aa8b3341618171a74497832d2d67d76dea4374c14060c308ba9a69369b4bfd19c83ff9d5891410758b252bcc714e6031a44a30 WHIRLPOOL 31b2a2ed5fb7e2a70a887e37bc0c6e130830cd256c91f2ead57feeab242d8ad46403dfc6d2062294bb01ac390b05f96064662f05cf67560ce64a93ad4bfcd84b
AUX ntop-5.0.1-librrd.patch 853 SHA256 b079ffa8649cc01afd8e53c6810200f6db64f344ca2ddda8c0b012c60c846cb4 SHA512 32f19b1713aa26852df31928dcfaebc8861176f175b06de1724711146b0aad7686608264f1ef9f8a1b1396b0571d5cdd53599cc7944a6cd0d08f8e2935fabbb8 WHIRLPOOL 20d51b854509bf7c8811b707072bc03bdc2f2842b510d56baa51c82b2010cb69954cf8ca11adb72a6d8d5a4d49cb33a38620aa61462c7e86e32135914542a679
AUX ntop-confd 341 SHA256 b582253490df4cde55dda97585d45d16b2968296da7e9bc996dde932cf42584d SHA512 8693050cab03eeb29b59e0a7b173c7791625e8cd6bc33eaa5d74a50ab3ecf435577d7918626cfe3963a0d23d4522a737737b2b9fd8335df29784858a6191813d WHIRLPOOL b467f3baf1065ca7a2434fce23561b270adf1507d36269f1adec04ac41d08866885b043673d2908c44dc6fecb4db1768bc1a01ce590d65e4a629bf5b75b21d67
-AUX ntop-initd-r1 674 SHA256 19cd6a205d2b891bf6bc9ebfca72244f176e3b4e2edb7ec7d1a1ac39b16bde68 SHA512 82f504f2e302ecdbbf72a45de65eb554e170f4c8b5ef1d8d77df839df3d63abf0ffc98c41ed41fd7c17aa890a2b7179f0048feb0ebc1a429538eefb8cbfd8a03 WHIRLPOOL 80ecdf1607d3fd1b08d05e07ec2bab2ee3d1305f40adba74c8dc4f89bcf4163115ba729b55b89948c34bca775c0539c94b3c06b72719ba8a6135208e29ae45d8
+AUX ntop-initd-r1 2280 SHA256 85bc9203c854bcba691153952021ea2c927911194cd6be9adb7fc481d9e1af5c SHA512 50450fcb8f65cf3407059a3ef50820dd5264bdcfbbf2cd8d7ae15e22470a696574501f5d45268ea29ad40a369826bf4cd9efde14c4066c8c1d61759d02bbc2d3 WHIRLPOOL 49ac1609856d08bc94a746513f119ad4105b99e1d90ca66d6f9220df6089f0604638af64d655ddfed980e4c9b0dfd89e20f56ec5a6c5856b2df76e6f9b54fca3
AUX ntop-update-geoip-db 492 SHA256 3604d0a728b203211fab05eca829a7e93bc05c04f252937ffbf630813420eef6 SHA512 7b5ae8dbd7d5d084c7278af1deb64a903b106663c3195df70acead3e8d7e14fbd996e69d5132c0ddac9147b3e70892c91695d834ab7b22fec2569efcd52df5f6 WHIRLPOOL d96c2fa39287ed6e0ac8b76a5c09ff4485305328bfd61fd738ff82a09cde0a8f0be76474d0c5bc95f0a55aa212b092f2e7b7a3bf3d8e6ee2ec1e88f246653e78
DIST ntop-5.0.1.tar.gz 40133867 SHA256 7e8e84cb14d2173beaca4d4cb991a14d84a4bef84ec37b2276bc363f45c52ef8 SHA512 f52c40e6c00c8d2f46b68078c5f9aef8ed78670f92a0a81f66f2f44c71d41bc4c001b4550f19b71c546f7c07cbbed15e0aa1ee13873ac63a11678bf2b8483f2a WHIRLPOOL aa20b6529f343f6f57fc1d880c8cf07cd11720c6fe8c968359ff1e16b77fe3f4c6df1ed83a184e580d6ef7f5eff6d245b2971c17a7dd674c12325f21029f64ee
EBUILD ntop-5.0.1-r1.ebuild 3222 SHA256 14f68f5056fa0e3837365665d0122f60c2fc44908866177fec112df564ee7dce SHA512 47f5df5903c51923373657b427791f64550d40b3214212a8ccb06d0ee9906edd92fee1abc5131c625389ef54d08052fd9305f8d7c14590a10970f44ac3fd00be WHIRLPOOL 26013f2a1409aed3a2007d6283d6614a145d8d6aaa62ab71d0982f6c84a4dfa0942808798b36d387a8c45ec8a6c9e40d84d3c741630905fb0c60f54e623a0b90
diff --git a/net-analyzer/ntop/files/ntop-initd-r1 b/net-analyzer/ntop/files/ntop-initd-r1
index e89175b1..d8b8722e 100644
--- a/net-analyzer/ntop/files/ntop-initd-r1
+++ b/net-analyzer/ntop/files/ntop-initd-r1
@@ -10,6 +10,20 @@ start_stop_daemon_args="-p ${pidfile} -m -b"
depend() {
need net
+
+ if [[ -e /etc/conf.d/tmpfs ]]; then
+ config /etc/conf.d/tmpfs
+ source /etc/conf.d/tmpfs
+ fi
+
+ local x="RC_BEFORE_${RC_SVCNAME}"
+ [[ -n ${!x} ]] && before ${!x}
+ local x="RC_NEED_${RC_SVCNAME}"
+ [[ -n ${!x} ]] && need ${!x}
+ local x="RC_USE_${RC_SVCNAME}"
+ [[ -n ${!x} ]] && use ${!x}
+ local x="RC_AFTER_${RC_SVCNAME}"
+ [[ -n ${!x} ]] && after ${!x}
}
start_pre() {
@@ -22,3 +36,49 @@ start_pre() {
export LC_ALL=C # apparently doesn't work with some locales (#191576 and #205382)
export GDFONTPATH=/usr/share/fonts/corefonts # apparently the only font that works (#231705)
}
+
+start() {
+
+ ebegin "Starting ntop"
+ #start-stop-daemon --start --exec /usr/bin/ntop --ionice 3 --nice 2 -- -d -L ${NTOP_OPTS}
+ start-stop-daemon --start --exec ${command} ${start_stop_daemon_args} \
+ --ionice 3 --nice 2 -- ${command_args}
+ eend $?
+ if (( ! $? )) && type -pf cpulimit >/dev/null 2>&1; then
+ sleep 0.1
+ local count=0
+ einfo "Waiting for 'ntop' to initialise ..."
+ while true; do
+ if ! [[ -e "${pidfile}" ]]; then
+ einfo "Waiting for PID file '${pidfile}' ..."
+ sleep 0.1
+ if [[ -e "${pidfile}" ]]; then
+ continue
+ fi
+ (( count++ ))
+ if (( count > 100 )); then
+ eerror "... timed out waiting for PID, aborting"
+ return 1
+ fi
+ elif ! ps $( cat "${pidfile}" ) >/dev/null 2>&1; then
+ einfo "Waiting for process '$( cat "${pidfile}" )' ..."
+ sleep 0.1
+ if ps $( cat "${pidfile}" ) >/dev/null 2>&1; then
+ einfo "... found"
+ count=0
+ break
+ fi
+ (( count++ ))
+ if (( count > 100 )); then
+ eerror "... timed out waiting for process, aborting"
+ return 1
+ fi
+ else
+ break
+ fi
+ done
+ ebegin "Starting cpulimit for ntop($( cat "${pidfile}" ))"
+ start-stop-daemon --start --exec $( type -pf cpulimit ) -- -p $( cat "${pidfile}" ) -l 20 -b -z
+ eend $?
+ fi
+}