Commit d146fd36 authored by Julien Danjou's avatar Julien Danjou Committed by Tobias Frost

Import Debian changes 1.2.3-1

bwbar (1.2.3-1) unstable; urgency=low

  * New upstream release
  * Bump standards version
  * Add LSB section to init script
  * Enhance init script
parents aab833bb 15279421
CC = @CC@
CFLAGS = @CFLAGS@
LDFLAGS = @LDFLAGS@
LIBS = @LIBS@
## $Id: Makefile.in,v 1.1 2004/01/07 20:36:41 hpa Exp $
## $Id: Makefile,v 1.7 2006/08/26 16:37:17 hpa Exp $
## -----------------------------------------------------------------------
##
## Copyright 2001 H. Peter Anvin - All Rights Reserved
## Copyright 2001-2006 H. Peter Anvin - All Rights Reserved
##
## This program is free software; you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
......@@ -13,21 +13,28 @@
PROGS = bwbar
CC = cc
CFLAGS = -g -Wall -O2 -Wall -W -Wpointer-arith -Wbad-function-cast -Wstrict-prototypes -Wnested-externs -Winline -Wshadow -Wcast-align -pipe
LDFLAGS =
LIBS = -lpng -lz
-include MCONFIG
all: $(PROGS)
clean:
rm -f $(PROGS)
rm -f *.o $(PROGS)
distclean: clean
rm -f *~ \#* core
autoconf
rm -f *~ \#* core MCONFIG config.*
rm -rf autom4te.cache
bwbar: bwbar.c
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< $(LIBS)
MCONFIG: config.status MCONFIG.in
./config.status
config.status: configure
./configure
configure: configure.in
autoconf
## $Id: Makefile.in,v 1.1 2004/01/07 20:36:41 hpa Exp $
## -----------------------------------------------------------------------
##
## Copyright 2001 H. Peter Anvin - All Rights Reserved
##
## This program is free software; you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
## the Free Software Foundation, Inc., 675 Mass Ave, Cambridge MA 02139,
## USA; either version 2 of the License, or (at your option) any later
## version; incorporated herein by reference.
##
## -----------------------------------------------------------------------
PROGS = bwbar
CC = @CC@
CFLAGS = @CFLAGS@
LDFLAGS = @LDFLAGS@
LIBS = @LIBS@
all: $(PROGS)
clean:
rm -f $(PROGS)
distclean: clean
rm -f *~ \#* core
bwbar: bwbar.c
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< $(LIBS)
bwbar 1.2.1 by H. Peter Anvin <hpa@zytor.com>
bwbar 1.2.2 by H. Peter Anvin <hpa@zytor.com>
http://www.kernel.org/pub/software/web/bwbar/
ftp://ftp.kernel.org/pub/software/web/bwbar/
......
/* $Id: bwbar.c,v 1.5 2001/09/21 22:33:35 hpa Exp $ */
/* $Id: bwbar.c,v 1.7 2006/08/26 16:31:26 hpa Exp $ */
/* ----------------------------------------------------------------------- *
*
* Copyright 1999-2001 H. Peter Anvin - All Rights Reserved
* Copyright 1999-2006 H. Peter Anvin - All Rights Reserved
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......@@ -278,6 +278,8 @@ int main(int argc, char *argv[])
first = 1;
lbin = 0; lbout = 0;
gettimeofday(&t_last, NULL);
while ( 1 ) {
......
This diff is collapsed.
......@@ -3,8 +3,8 @@ dnl autoconf input file to generate MCONFIG
dnl
AC_PREREQ(2.57)
AC_REVISION([$Id: configure.in,v 1.1 2004/01/07 20:36:41 hpa Exp $])
AC_INIT(Makefile.in)
AC_REVISION([$Id: configure.in,v 1.2 2006/08/26 16:30:05 hpa Exp $])
AC_INIT(MCONFIG.in)
AC_PROG_CC
AC_GNU_SOURCE
......@@ -23,10 +23,11 @@ PA_ADD_CFLAGS(-Wshadow)
PA_ADD_CFLAGS(-Wcast-align)
PA_ADD_CFLAGS(-pipe)
AC_SEARCH_LIBS(compress2, z)
AC_SEARCH_LIBS(png_init_io, png)
AC_SEARCH_LIBS(pow, m, , AC_ERROR([No math library found]))
AC_SEARCH_LIBS(compress2, z, , AC_ERROR([No zlib library found]))
AC_SEARCH_LIBS(png_create_write_struct, png, , AC_ERROR([No PNG library found]))
AC_PROG_RANLIB
AC_PROG_INSTALL
AC_OUTPUT(Makefile)
AC_OUTPUT(MCONFIG)
There is a /etc/default/bwbar file to configure before this package will
work.
Scott Dier <sdier@debian.org>
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.35.
.TH BWBAR "8" "Apr. 18, 2006" "bwbar 1.2.3"
.SH NAME
bwbar \- generates text and graphical readout of current bandwidth use.
.SH SYNOPSIS
.B bwbar
[\fB\-i|-o\fR] [\fB\-g|-G|-k|-K|-m|-M\fR] [\fIOPTION\fR]... \fIINTERFACE\fR \fIMAX_MBPS\fR
.SH DESCRIPTION
Generates text and graphical readout of current bandwidth use.
.SH OPTIONS
.TP
\fB\-b\fR, \fB\-\-border\fR=\fIN\fR
Set border width of the graphical bar to N (default 1 pixel).
.TP
\fB\-d\fR, \fB\-\-directory\fR=\fIN\fR
Output directory is N.
.TP
\fB\-f\fR, \fB\-\-text\-file\fR=\fIN\fR
Set N as name of the text output file (default ubar.txt).
.TP
\fB\-h\fR, \fB\-\-help\fR
Display usage.
.TP
\fB\-p\fR, \fB\-\-png\-file\fR=\fIN\fR
Set N as name of the graphical bar file (default ubar.png).
.TP
\fB\-t\fR, \fB\-\-interval\fR=\fIN\fR
The poll interval in seconds is N (default 15 seconds).
.TP
\fB\-x\fR, \fB\-\-width\fR=\fIN\fR
Set the width of the graphical bar to N (default 600 pixels).
.TP
\fB\-y\fR, \fB\-\-height\fR=\fIN\fR
Set the height of the graphical bar to N (default 4 pixels).
.SH FLAGS
.TP
\fB\-i\fR, \fB\-\-input\fR
Measure input bandwidth.
.TP
\fB\-g\fR, \fB\-\-GBps\fR
Bandwidth is measured in GB/s.
.TP
\fB\-G\fR, \fB\-\-Gbps\fR
Bandwidth is measured in Gbit/s.
.TP
\fB\-k\fR, \fB\-\-kbps\fR
Bandwidth is measured in kbit/s.
.TP
\fB\-K\fR, \fB\-\-KBps\fR
Bandwidth is measured in KB/s.
.TP
\fB\-m\fR, \fB\-\-MBps\fR
Bandwidth is measured in MB/s.
.TP
\fB\-M\fR, \fB\-\-Mbps\fR
Bandwidth is measured in Mbit/s.
.TP
\fB\-o\fR, \fB\-\-output\fR
Measure output bandwidth.
.PP
Default values are \fB\-M\fR and \fB\-o\fR.
.SH AUTHOR
Written by Nacho Barrientos Arias <chipi@criptonita.com>.
.SH BUGS
Report bugs to <hpa@zytor.com>.
.SH COPYRIGHT
Copyright \(co 1999-2001 H. Peter Anvin - All Rights Reserved
.br
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, Inc.
.SH "SEE ALSO"
You can get all the available information for
.B bwbar
in:
.IP
.B http://www.kernel.org/pub/software/web/bwbar/
.PP
bwbar (1.2.3-1) unstable; urgency=low
* New upstream release
* Bump standards version
-- Julien Danjou <acid@debian.org> Mon, 11 Sep 2006 13:49:25 +0200
bwbar (1.2.2-4) unstable; urgency=low
* New maintainer
* Bump standards version
* Use debhelper 4
* Remove http://www.kernel.org from description since this is no more
accurate
* Update README.Debian
* Rework patches
- Handle new options correctly (Closes: #313231)
* Add manpage (Closes: #129668)
* Fix {pre,post}{rm,inst} scripts to use invoke-rc.d
-- Julien Danjou <acid@debian.org> Sun, 23 Apr 2006 13:11:09 +0200
bwbar (1.2.2-3.1) unstable; urgency=low
* NMU
* Fix a wrong setting in rules, causing FTBFS (Closes: #358940)
-- Julien Danjou <acid@debian.org> Fri, 21 Apr 2006 18:03:11 +0200
bwbar (1.2.2-3) unstable; urgency=low
* Applied patch from Adrian Reber that fixed the short flag (d) for
directory. (Closes: #260999)
-- Scott M. Dier <sdier@debian.org> Sat, 24 Jul 2004 00:20:02 -0500
bwbar (1.2.2-2) unstable; urgency=low
* Added Build-Depends on cdbs.
-- Scott M. Dier <sdier@debian.org> Tue, 8 Jun 2004 07:36:25 -0500
bwbar (1.2.2-1) unstable; urgency=low
* New upstream release (Closes: #250730)
* Converted to cdbs.
* Added patch to support {K,M,G}B/s. (Closes: #249852)
-- Scott M. Dier <sdier@debian.org> Tue, 1 Jun 2004 15:01:34 -0500
bwbar (1.2-7) unstable; urgency=low
* Fixed fscanf call in bwbar.c for longer interface names.
(Closes: #246054)
* Fixed README for inaccurate configuration information. (Closes: #229162)
-- Scott M. Dier <sdier@debian.org> Wed, 12 May 2004 01:01:48 -0500
bwbar (1.2-6) unstable; urgency=low
* Fixed init.d message about being unconfigured. (Closes: #199202)
* Recompiled against libpng3. (Closes: #180243)
-- Scott M. Dier <sdier@debian.org> Wed, 10 Dec 2003 20:44:05 -0600
bwbar (1.2-5) unstable; urgency=low
* Fixed that I didn't reperm the init.d script, this causes issues
because diffs don't keep permissions. Closes: #122310
-- Scott M. Dier <sdier@debian.org> Tue, 4 Dec 2001 01:08:37 -0600
bwbar (1.2-4) unstable; urgency=low
* Didn't copy a line right in the init.d script, fixed. Closes: #119536
-- Scott M. Dier <sdier@debian.org> Wed, 14 Nov 2001 14:31:34 -0600
bwbar (1.2-3) unstable; urgency=low
* Fixed build-deps, added libpng2-dev. closes: #114375
-- Scott M. Dier <sdier@debian.org> Sat, 6 Oct 2001 20:27:46 -0500
bwbar (1.2-2) unstable; urgency=low
* Added --directory function to daemon.
-- Scott M. Dier <sdier@debian.org> Mon, 1 Oct 2001 02:00:52 -0500
bwbar (1.2-1) unstable; urgency=low
* Initial Release.
-- Scott M. Dier <sdier@debian.org> Sun, 30 Sep 2001 23:35:14 -0500
Local variables:
mode: debian-changelog
End:
Source: bwbar
Section: net
Priority: optional
Maintainer: Julien Danjou <acid@debian.org>
Build-Depends: debhelper (>> 4.0.0), libpng12-dev, cdbs
Standards-Version: 3.7.2
Package: bwbar
Architecture: any
Depends: ${shlibs:Depends}
Description: generates text and graphical readout of current bandwidth use
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. The amount
of total bandwidth can be customized. The PNG output appears as a bar graph
showing maximum possible usage with the current inbound or outbound usage
shown as a differently colored bar.
This package was debianized by Scott M. Dier <sdier@debian.org> on
Sun, 30 Sep 2001 23:35:14 -0500.
It was downloaded from http://www.kernel.org/pub/software/web/bwbar/
Upstream Author: Peter Anvin <hpa@zytor.com>
Copyright:
Copyright 1999-2001 H. Peter Anvin - All Rights Reserved
You are free to distribute this software under the terms of
the GNU General Public License.
On Debian systems, the complete text of the GNU General Public
License can be found in /usr/share/common-licenses/GPL file.
usr/sbin
etc/init.d
etc/default
debian/bwbar.8
#!/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 bwbar: "
start-stop-daemon --start -b -c $RUNAS --exec $RUNME -- --directory=$DIR $OPTIONS
echo "done."
;;
stop)
if [ -z "$DIR" -a -z "$RUNAS" -a -z "$OPTIONS" ]
then
exit 0
fi
echo -n "Stopping bwbar: "
start-stop-daemon --stop -u $RUNAS --exec $RUNME
echo "done."
;;
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 bwbar: "
start-stop-daemon --stop -u $RUNAS --exec $RUNME
sleep 1
start-stop-daemon --start -b -c $RUNAS --exec $RUNME -- --directory=$DIR $OPTIONS
echo "done."
;;
*)
echo "Usage: /etc/init.d/bwbar {start|stop|restart}"
exit 1
esac
exit 0
# 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"
--- ./bwbar.c 2001-09-21 17:33:35.000000000 -0500
+++ ../bwbar-1.2/bwbar.c 2003-12-10 20:43:59.000000000 -0600
@@ -147,6 +147,7 @@
const struct option longopts[] = {
{ "input", 0, 0, 'i' },
{ "output", 0, 0, 'o' },
+ { "directory", 1, 0, 'd' },
{ "text-file", 1, 0, 'f' },
{ "png-file", 1, 0, 'p' },
{ "interval", 1, 0, 't' },
@@ -169,6 +170,7 @@
"Options: (defaults in parenthesis)\n"
" --input -i Measure input bandwidth\n"
" --output -o Measure output bandwidth (default)\n"
+ " --directory -d Output directory\n"
" --text-file <file> -f The name of the text output file (ubar.txt)\n"
" --png-file <file> -p The name of the graphical bar file (ubar.png)\n"
" --interval <seconds> -t The poll interval in seconds (15)\n"
@@ -205,6 +207,8 @@
int measure_input = 0; /* Input instead of output */
char *text_file = "ubar.txt"; /* Text filename */
char *graphics_file = "ubar.png"; /* Graphics filename */
+ char *directory = ""; /* Directory name */
+ char *tmp_char;
char *unit_name = "Mbit/s"; /* Unit name */
double unit = 1.0e+6; /* Unit multiplier */
int interval = 15; /* Interval between measurements (s) */
@@ -214,7 +218,7 @@
program = argv[0];
- while ( (opt = getopt_long(argc, argv, "iof:p:t:x:y:b:kMGh", longopts, NULL)) != -1 ) {
+ while ( (opt = getopt_long(argc, argv, "iof:p:t:x:y:b:kMGhd:", longopts, NULL)) != -1 ) {
switch ( opt ) {
case 'i':
measure_input = 1;
@@ -228,6 +232,9 @@
case 'p':
graphics_file = optarg;
break;
+ case 'd':
+ directory = optarg;
+ break;
case 't':
interval = atoi(optarg);
break;
@@ -264,6 +271,18 @@
if ( argc-optind != 2 )
usage(1);
+ tmp_char = text_file;
+ text_file = malloc(strlen(text_file) + strlen(directory) + 5);
+ strcpy(text_file, directory);
+ strcat(text_file, "/");
+ strcat(text_file, tmp_char);
+
+ tmp_char = graphics_file;
+ graphics_file = malloc(strlen(graphics_file) + strlen(directory) + 5);
+ strcpy(graphics_file, directory);
+ strcat(graphics_file, "/");
+ strcat(graphics_file, tmp_char);
+
t_tmp = malloc(strlen(text_file) + 5);
g_tmp = malloc(strlen(graphics_file) + 5);
if ( !t_tmp || !g_tmp ) {
diff -u bwbar-1.2.orig/README bwbar-1.2/README
--- bwbar-1.2.orig/README 2004-05-19 16:36:16.000000000 +0200
+++ bwbar-1.2/README 2004-05-19 16:38:14.000000000 +0200
@@ -59,6 +59,7 @@
Options: (defaults in parenthesis)
--input -i Measure input bandwidth
--output -o Measure output bandwidth (default)
+ --directory -d Output directory
--text-file <file> -f The name of the text output file (ubar.txt)
--png-file <file> -p The name of the graphical bar file (ubar.png)
--interval <seconds> -t The poll interval in seconds (15)
--- bwbar.c 2004-06-01 14:54:12.000000000 -0500
+++ ../tmp/bwbar-1.2/bwbar.c 2004-05-12 00:58:50.000000000 -0500
@@ -315,7 +315,7 @@
/* Get interface info */
do {
- if ( fscanf(pnd, " %6[^:]:%u %u %u %u %u %u %u %u %u %u %u %u %u %u %u %u",
+ if ( fscanf(pnd, " %8[^:]:%u %u %u %u %u %u %u %u %u %u %u %u %u %u %u %u",
ifc.name,
&ifc.r_bytes, &ifc.r_pkt, &ifc.r_err, &ifc.r_drop,
&ifc.r_fifo, &ifc.r_frame, &ifc.r_compr, &ifc.r_mcast,
diff -u bwbar-1.2.orig/bwbar.c bwbar-1.2/bwbar.c
--- bwbar-1.2.orig/bwbar.c 2004-05-19 16:36:16.000000000 +0200
+++ bwbar-1.2/bwbar.c 2004-05-19 16:38:12.000000000 +0200
@@ -157,6 +157,9 @@
{ "kbps", 0, 0, 'k' },
{ "Mbps", 0, 0, 'M' },
{ "Gbps", 0, 0, 'G' },
+ { "KBps", 0, 0, 'K' },
+ { "MBps", 0, 0, 'm' },
+ { "GBps", 0, 0, 'g' },
{ "help", 0, 0, 'h' },
{ 0, 0, 0, 0 }
};
@@ -180,6 +183,9 @@
" --kbps -k Bandwidth is measured in kbit/s\n"
" --Mbps -M Bandwidth is measured in Mbit/s (default)\n"
" --Gbps -G Bandwidth is measured in Gbit/s\n"
+ " --KBps -K Bandwidth is measured in KB/s\n"
+ " --MBps -m Bandwidth is measured in MB/s\n"
+ " --GBps -g Bandwidth is measured in GB/s\n"
" --help -h Display this text\n",
program);
exit(err);
@@ -259,6 +265,18 @@
unit = 1.0e+9;
unit_name = "Gbit/s";
break;
+ case 'K':
+ unit = 8.0e+3;
+ unit_name = "KB/s";
+ break;
+ case 'm':
+ unit = 8.0e+6;
+ unit_name = "MB/s";
+ break;
+ case 'g':
+ unit = 8.0e+9;
+ unit_name = "GB/s";
+ break;
case 'h':
usage(0);
break;
Common subdirectories: bwbar-1.2.orig/debian and bwbar-1.2/debian
diff -u bwbar-1.2.orig/README bwbar-1.2/README
--- bwbar-1.2.orig/README 2004-05-19 16:36:16.000000000 +0200
+++ bwbar-1.2/README 2004-05-19 16:38:14.000000000 +0200
@@ -68,4 +71,8 @@
--kbps -k Bandwidth is measured in kbit/s
--Mbps -M Bandwidth is measured in Mbit/s (default)
--Gbps -G Bandwidth is measured in Gbit/s
+ --KBps -K Bandwidth is measured in KB/s
+ --MBps -m Bandwidth is measured in MB/s
+ --GBps -g Bandwidth is measured in GB/s
--help -h Display this text
+
#!/bin/sh
set -e
update-rc.d bwbar defaults >/dev/null
invoke-rc.d bwbar start
#DEBHELPER#
exit 0
#!/bin/sh
set -e
if [ "$1" = purge ]; then
update-rc.d bwbar remove >/dev/null
fi
#DEBHELPER#
#!/bin/sh
set -e
case "$1" in
upgrade)
invoke-rc.d bwbar stop
;;
install)
;;
*)
echo "preinst called with unknown argument \`$1'" >&2
exit 0
;;
esac
#DEBHELPER#
exit 0
#!/bin/sh
case "$1" in
remove|upgrade|deconfigure)
invoke-rc.d bwbar stop
;;
failed-upgrade)
;;
*)
echo "prerm called with unknown argument \`$1'" >&2
exit 0
;;
esac
#DEBHELPER#
exit 0
#!/usr/bin/make -f
include /usr/share/cdbs/1/rules/debhelper.mk
include /usr/share/cdbs/1/class/autotools.mk
include /usr/share/cdbs/1/rules/simple-patchsys.mk
DEB_MAKE_INSTALL_TARGET =
cleanbuilddir::
rm -f config.log config.status
common-install-arch common-install-indep:: common-install-impl
common-install-impl::
cp $(CURDIR)/bwbar $(CURDIR)/debian/bwbar/usr/sbin/
cp $(CURDIR)/debian/otherfiles/bwbar $(CURDIR)/debian/bwbar/etc/init.d/
cp $(CURDIR)/debian/otherfiles/bwbar-default $(CURDIR)/debian/bwbar/etc/default/bwbar
chmod 755 $(CURDIR)/debian/bwbar/etc/init.d/bwbar
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.35.
.TH BWBAR "8" "Apr. 18, 2006" "bwbar 1.2.2"
.TH BWBAR "8" "Apr. 18, 2006" "bwbar 1.2.3"
.SH NAME
bwbar \- manual page for bwbar 1.2.2
bwbar \- generates text and graphical readout of current bandwidth use.
.SH SYNOPSIS
.B bwbar
[\fB\-i|-o\fR] [\fB\-g|-G|-k|-K|-m|-M\fR] [\fIOPTION\fR]... \fIINTERFACE\fR \fIMAX_MBPS\fR
......
bwbar (1.2.3-1) unstable; urgency=low
* New upstream release
* Bump standards version
* Add LSB section to init script
* Enhance init script
-- Julien Danjou <acid@debian.org> Mon, 11 Sep 2006 14:05:37 +0200
bwbar (1.2.2-4) unstable; urgency=low
* New maintainer
......
......@@ -3,7 +3,7 @@ Section: net
Priority: optional
Maintainer: Julien Danjou <acid@debian.org>
Build-Depends: debhelper (>> 4.0.0), libpng12-dev, cdbs
Standards-Version: 3.6.2
Standards-Version: 3.7.2
Package: bwbar
Architecture: any
......
#!/bin/sh
#
# for the bwbar package
# Scott Dier <sdier@debian.org>
### 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
# delete/comment the following two lines when configured.
#echo "/etc/init.d/bwbar isn't configured yet, not starting bwbar."
#exit 0
# default settings are suggestions, they may or may not fit your situation
RUNME=/usr/sbin/bwbar
#DIR=/var/www
#RUNAS=www-data
#OPTIONS="eth0 1.5"
#[ -x $RUNME ] || exit 0
case "$1" in
start)
......@@ -27,18 +26,18 @@ case "$1" in
echo "not starting bwbar, please edit /etc/default/bwbar"
exit 0
fi
echo -n "Starting bwbar: "
echo -n "Starting bandwidth bar daemon: "
start-stop-daemon --start -b -c $RUNAS --exec $RUNME -- --directory=$DIR $OPTIONS
echo "done."
echo "bwbar."
;;
stop)
if [ -z "$DIR" -a -z "$RUNAS" -a -z "$OPTIONS" ]
then
exit 0
fi
echo -n "Stopping bwbar: "
echo -n "Stopping bandwidth bar daemon: "
start-stop-daemon --stop -u $RUNAS --exec $RUNME
echo "done."
echo "bwbar."
;;
restart|force-reload)
if [ -z "$DIR" -a -z "$RUNAS" -a -z "$OPTIONS" ]
......@@ -46,14 +45,14 @@ case "$1" in
echo "not starting bwbar, please edit /etc/default/bwbar"
exit 0
fi
echo -n "Restarting bwbar: "
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 "done."
echo "bwbar."
;;
*)
echo "Usage: /etc/init.d/bwbar {start|stop|restart}"
echo "Usage: /etc/init.d/bwbar {start|stop|restart|force-reload}"
exit 1
esac