initial commit
This commit is contained in:
commit
08d9495a72
47 changed files with 6983 additions and 0 deletions
59
debian/otherfiles/bwbar
vendored
Normal file
59
debian/otherfiles/bwbar
vendored
Normal file
|
|
@ -0,0 +1,59 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
### BEGIN INIT INFO
|
||||
# Provides: bwbar
|
||||
# Required-Start: $local_fs
|
||||
# Required-Stop: $local_fs
|
||||
# Default-Start: 2 3 4 5
|
||||
# Default-Stop: 0 1 6
|
||||
# Short-Description: generates text and graphical readout of current bandwidth use
|
||||
# Description: This program will output a PNG and a text file that can be
|
||||
# used in scripts or be included in web pages to show current
|
||||
# bandwidth usage.
|
||||
### END INIT INFO
|
||||
|
||||
if [ -r /etc/default/bwbar ]; then
|
||||
. /etc/default/bwbar
|
||||
fi
|
||||
|
||||
# default settings are suggestions, they may or may not fit your situation
|
||||
RUNME=/usr/sbin/bwbar
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
if [ -z "$DIR" -a -z "$RUNAS" -a -z "$OPTIONS" ]
|
||||
then
|
||||
echo "not starting bwbar, please edit /etc/default/bwbar"
|
||||
exit 0
|
||||
fi
|
||||
echo -n "Starting bandwidth bar daemon: "
|
||||
start-stop-daemon --start -b -c $RUNAS --exec $RUNME -- --directory=$DIR $OPTIONS
|
||||
echo "bwbar."
|
||||
;;
|
||||
stop)
|
||||
if [ -z "$DIR" -a -z "$RUNAS" -a -z "$OPTIONS" ]
|
||||
then
|
||||
exit 0
|
||||
fi
|
||||
echo -n "Stopping bandwidth bar daemon: "
|
||||
start-stop-daemon --stop -u $RUNAS --exec $RUNME
|
||||
echo "bwbar."
|
||||
;;
|
||||
restart|force-reload)
|
||||
if [ -z "$DIR" -a -z "$RUNAS" -a -z "$OPTIONS" ]
|
||||
then
|
||||
echo "not starting bwbar, please edit /etc/default/bwbar"
|
||||
exit 0
|
||||
fi
|
||||
echo -n "Restarting bandwidth bar daemon: "
|
||||
start-stop-daemon --stop -u $RUNAS --exec $RUNME
|
||||
sleep 1
|
||||
start-stop-daemon --start -b -c $RUNAS --exec $RUNME -- --directory=$DIR $OPTIONS
|
||||
echo "bwbar."
|
||||
;;
|
||||
*)
|
||||
echo "Usage: /etc/init.d/bwbar {start|stop|restart|force-reload}"
|
||||
exit 1
|
||||
esac
|
||||
|
||||
exit 0
|
||||
6
debian/otherfiles/bwbar-default
vendored
Normal file
6
debian/otherfiles/bwbar-default
vendored
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
# Directory to put files into
|
||||
#DIR=/var/www
|
||||
# Who to run as
|
||||
#RUNAS=www-data
|
||||
# What are the options (eth0, scale of 1.5mbps)
|
||||
#OPTIONS="eth0 1.5"
|
||||
Loading…
Add table
Add a link
Reference in a new issue