Commit 22a4623a authored by Natanael Copa's avatar Natanael Copa

testing/smokeping: misc fixes ref #348

parent 23db8ff6
# Contributor: Jeff Bilyk <jbilyk at gmail>
pkgname=smokeping
pkgver=2.4.2
pkgrel=0
pkgrel=1
pkgdesc="Smokeping network latency monitoring"
pkgusers="smokeping"
pkggroups="smokeping"
......@@ -50,15 +50,14 @@ package() {
cp -ra "$_builddir"/lib/* "$pkgdir"/$_vendorlib
# install cgi scripts
sed -e 's:^use lib:#use lib:g' \
-e 's:/home/oetiker.*/config.dist:/etc/smokeping/config:' \
-i htdocs/*.cgi.dist
for i in smokeping.cgi tr.cgi; do
install -m755 htdocs/$i.dist \
sed -i -e 's:^use lib:#use lib:' \
-e 's:/home/oetiker.*/config.dist:/etc/smokeping/config:' \
-e '1s:.*:#!/usr/bin/perl:' \
htdocs/$i.dist || return 1
mv htdocs/$i.dist \
"$pkgdir"/usr/share/webapps/smokeping/$i \
|| return 1
rm htdocs/$i.dist
done
# install ajax scripts
......@@ -82,6 +81,7 @@ package() {
-e '/^tmail/{s:\(^tmail[ \t]*=\).*:\1 /etc/smokeping/tmail:}' \
-e '/^secrets/{s:\(^secrets[ \t]*=\).*:\1 /etc/smokeping/smokeping_secrets:}' \
-e '/^template/{s:\(^template[ \t]*=\).*:\1 /etc/smokeping/basepage.html:}' \
-e '/^sendmail/{s:usr/lib:usr/sbin:}' \
-i etc/config.dist || return 1
sed -e '/^<script/{s:cropper/:/cropper/:}' \
......@@ -94,12 +94,15 @@ package() {
done
chmod 700 "$pkgdir"/etc/smokeping/smokeping_secrets
# initscript
install -Dm755 "$srcdir"/smokeping.initd "$pkgdir"/etc/init.d/smokeping\
|| return 1
install -d -o smokeping -g smokeping -m755 "$pkgdir"/var/lib/smokeping.simg
install -d -o smokeping -g smokeping -m755 \
"$pkgdir"/var/lib/smokeping \
"$pkgdir"/var/lib/smokeping/.simg \
"$pkgdir"/var/run/smokeping
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment