\r
#include "cll1.h"\r
\r
-const char *version="0.7.7"; /*0.7.9 will be last development, 0.8.0 first stable */\r
+const char *version="0.7.7-1"; /*0.7.9 will be last development, 0.8.0 first stable */\r
\r
/* ======= Help screen is hopefuly self-documenting part of code :-) ======= */\r
\r
mkdir -p $DEBIAN_BASE/usr/share/man
mkdir -p $DEBIAN_BASE/usr/share/man/man1
mkdir -p $DEBIAN_BASE/usr/share/man/man5
-mkdir -p $DEBIAN_BASE/etc
-mkdir -p $DEBIAN_BASE/etc/cron.d
-mkdir -p $DEBIAN_BASE/etc/prometheus
mkdir -p $DEBIAN_BASE/DEBIAN
chmod 0755 $DEBIAN_BASE/DEBIAN
make main
fi
-# Data
+# Copy
cp prometheus $DEBIAN_BASE/usr/sbin
cp prometheus.1 $DEBIAN_BASE/usr/share/man/man1
cp prometheus.conf.5 $DEBIAN_BASE/usr/share/man/man5
-cp sample-configuration/prometheus.cron $DEBIAN_BASE/etc/cron.d/prometheus
-cp sample-configuration/prometheus.conf $DEBIAN_BASE/etc/prometheus
-cp sample-configuration/hosts $DEBIAN_BASE/etc/prometheus
+cp -R etc $DEBIAN_BASE/etc
+
+# .svn cleanup
+rm -rf $DEBIAN_BASE/etc/.svn
+rm -rf $DEBIAN_BASE/etc/*/.svn
+
+# Chmod a+x scripts
+chmod 755 $DEBIAN_BASE/etc/cron.d/prometheus
+chmod 755 $DEBIAN_BASE/etc/init.d/prometheus
# Strip debug info from binary
strip $DEBIAN_BASE/usr/sbin/prometheus
cp -R $DEB_PCK_NAME.postrm $DEBIAN_BASE/DEBIAN/postrm
fi
-# Asi zbytecne
-#for f in `find $DEBIAN_BASE -path ".svn*"`
-#do
-# rm -R $f 2>/dev/null
-#done;
+# Cleanup
+for f in `find $DEBIAN_BASE/etc -path ".svn*"`
+do
+ rm -R $f 2>/dev/null
+done;
# Momentalne se nepouziva
#SIZEDU=`du -sk "$DEBIAN_BASE" | awk '{ print $1}'`
-How we use Prometheus QoS in Brevnov:
+How do we use Prometheus QoS in Brevnov:
-1) /etc/hosts
+1) /etc/prometheus/hosts
1500+ IP addresses are asigned either guaranted speed classes 64, 128, 256
and 512 kbps, with various HTB ceil rates, using "via-prometheus-" keyword.
Some of IP addresses are set to share connection speed with internet
gateway using "sharing-" keyword.
-2) /etc/prometheus.conf
+2) /etc/prometheus/prometheus.conf
There are daily traffic quotas defined using "magic-relative-limit" value
se to 8. This translates into 48h quota 1 GB for 64 kbps lines,
iptables nat table (-t nat). Prometheus QoS uses only iptables mangle
tables (-t mangle), see FAQ.
-4) /etc/crontab and related files
+4) /etc/cron.d/prometheus and related files
Every hour, we run prometheus with -p switch to generate preview. On system
boot, we run prometheus with -n switch to skip QoS free period.
#==========================================================================
#Filename of /etc/hosts - style IP address configuration file
#--------------------------------------------------------------------------
-hosts /etc/hosts
+hosts /etc/prometheus/hosts
#==========================================================================
#Keywords found in /etc/host comments - syntax KEYWORD-MIN-MAX
#Eg.: 192.168.1.2 mypc #via-prometheus-256-512
#guranted upload and download bandwidth FROM your ISP (in kbps, please!)
#asymetry settings will be automaticaly calculated from these values
#--------------------------------------------------------------------------
-wan-download 30000 #kbps
-wan-upload 30000 #kbps
+wan-download 40000 #kbps
+wan-upload 40000 #kbps
#==========================================================================
#special QoS free zone (eg. free CZFree tranzit, etc.)
#Apply QoS on HTTP proxy IP addres/port
+++ /dev/null
-# Prometheus Cron file now made with 5% more love
-# (thanks to Danny for suggestion)
-
-0 0,1,7-23 * * * root nice /usr/sbin/prometheus -p 1>/dev/null
-0 2 * * * root /root/sbin/prometheus 1>/dev/null