From 5def4ce39f6eec34acb8c333068da837bb28311b Mon Sep 17 00:00:00 2001 From: xchaos Date: Tue, 8 Jan 2008 15:08:09 +0000 Subject: [PATCH] sample configuration changed git-svn-id: https://dev.arachne.cz/repos/prometheus/trunk@42 251d49ef-1d17-4917-a970-b30cf55b089b --- etc/cron.d/prometheus | 5 ++++ etc/init.d/prometheus | 23 +++++++++++++++++++ hosts.SAMPLE => etc/prometheus/hosts | 0 .../prometheus/prometheus.conf | 2 +- prometheus.c | 4 ++-- sample-configuration/prometheus.cron | 4 ++-- 6 files changed, 33 insertions(+), 5 deletions(-) create mode 100644 etc/cron.d/prometheus create mode 100644 etc/init.d/prometheus rename hosts.SAMPLE => etc/prometheus/hosts (100%) rename prometheus.conf.SAMPLE => etc/prometheus/prometheus.conf (99%) diff --git a/etc/cron.d/prometheus b/etc/cron.d/prometheus new file mode 100644 index 0000000..df4d54e --- /dev/null +++ b/etc/cron.d/prometheus @@ -0,0 +1,5 @@ +# 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 diff --git a/etc/init.d/prometheus b/etc/init.d/prometheus new file mode 100644 index 0000000..c0f8170 --- /dev/null +++ b/etc/init.d/prometheus @@ -0,0 +1,23 @@ +#!/bin/sh +EXEFILE=/usr/sbin/prometheus + +case "$1" in + start) + $EXEFILE -n + ;; + stop) + $EXEFILE -f + ;; + kill) + $EXEFILE -9 + ;; + restart|force-reload) + $0 stop + sleep 1 + $0 start + ;; + *) + echo "Usage: $0 {start|stop|restart|force-reload|kill}" >&2 + exit 1 + ;; +esac diff --git a/hosts.SAMPLE b/etc/prometheus/hosts similarity index 100% rename from hosts.SAMPLE rename to etc/prometheus/hosts diff --git a/prometheus.conf.SAMPLE b/etc/prometheus/prometheus.conf similarity index 99% rename from prometheus.conf.SAMPLE rename to etc/prometheus/prometheus.conf index 01925f7..2c90a30 100644 --- a/prometheus.conf.SAMPLE +++ b/etc/prometheus/prometheus.conf @@ -20,7 +20,7 @@ iptables-file /var/spool/prometheus.iptables #========================================================================== #Filename of /etc/hosts - style IP address configuration file #-------------------------------------------------------------------------- -hosts /etc/prometheus.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 diff --git a/prometheus.c b/prometheus.c index 366608f..96ce797 100644 --- a/prometheus.c +++ b/prometheus.c @@ -57,8 +57,8 @@ int filter_type=1; /*1 mark, 2 classify*/ char *mark="MARK"; char *mark_iptables="MARK --set-mark "; int dry_run=0; /* preview - use puts() instead of system() */ -char *config="/etc/prometheus.conf"; /* main configuration file */ -char *hosts="/etc/hosts"; /* line bandwidth definition file */ +char *config="/etc/prometheus/prometheus.conf"; /* main configuration file */ +char *hosts="/etc/prometheus/hosts"; /* line bandwidth definition file */ char *tc="/sbin/tc"; /* requires tc with HTB support */ char *iptables="/usr/sbin/iptables"; /* requires iptables utility */ char *iptablessave="/usr/sbin/iptables-save"; /* new */ diff --git a/sample-configuration/prometheus.cron b/sample-configuration/prometheus.cron index 80c3fa2..df4d54e 100644 --- a/sample-configuration/prometheus.cron +++ b/sample-configuration/prometheus.cron @@ -1,5 +1,5 @@ # Prometheus Cron file now made with 5% more love # (thanks to Danny for suggestion) -0 0,1,7-23 * * * root nice /root/qos/prometheus -p 1>/dev/null -0 2 * * * root /root/qos/prometheus 1>/dev/null +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