From e1614f4ecf6a148290070fb92fb8ec5162316816 Mon Sep 17 00:00:00 2001 From: xchaos Date: Tue, 8 Jan 2008 15:28:15 +0000 Subject: [PATCH] reorganisation of sample configuration files git-svn-id: https://dev.arachne.cz/repos/prometheus/trunk@43 251d49ef-1d17-4917-a970-b30cf55b089b --- prometheus.c | 2 +- prometheus.debian | 27 +++++++++++++++------------ sample-configuration/README | 8 ++++---- sample-configuration/prometheus.conf | 6 +++--- sample-configuration/prometheus.cron | 5 ----- 5 files changed, 23 insertions(+), 25 deletions(-) delete mode 100644 sample-configuration/prometheus.cron diff --git a/prometheus.c b/prometheus.c index 96ce797..979516e 100644 --- a/prometheus.c +++ b/prometheus.c @@ -31,7 +31,7 @@ #include "cll1.h" -const char *version="0.7.7"; /*0.7.9 will be last development, 0.8.0 first stable */ +const char *version="0.7.7-1"; /*0.7.9 will be last development, 0.8.0 first stable */ /* ======= Help screen is hopefuly self-documenting part of code :-) ======= */ diff --git a/prometheus.debian b/prometheus.debian index e6cff66..99cd5ef 100755 --- a/prometheus.debian +++ b/prometheus.debian @@ -14,9 +14,6 @@ mkdir -p $DEBIAN_BASE/usr/share 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 @@ -25,13 +22,19 @@ if ! [ -x prometheus ]; then 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 @@ -64,11 +67,11 @@ if [ -f $DEB_PCK_NAME'.postrm' ]; then 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}'` diff --git a/sample-configuration/README b/sample-configuration/README index da5075d..1d094ae 100644 --- a/sample-configuration/README +++ b/sample-configuration/README @@ -1,13 +1,13 @@ -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, @@ -41,7 +41,7 @@ Both symetrical and asymetrical NAT is defined by another script file, in 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. diff --git a/sample-configuration/prometheus.conf b/sample-configuration/prometheus.conf index 8683ccf..c2da92c 100644 --- a/sample-configuration/prometheus.conf +++ b/sample-configuration/prometheus.conf @@ -15,7 +15,7 @@ iptables /sbin/iptables #========================================================================== #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 @@ -41,8 +41,8 @@ wan-medium 100Mbit #Mbit|kbit #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 diff --git a/sample-configuration/prometheus.cron b/sample-configuration/prometheus.cron deleted file mode 100644 index df4d54e..0000000 --- a/sample-configuration/prometheus.cron +++ /dev/null @@ -1,5 +0,0 @@ -# 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 -- 2.30.2