debian/0000755000000000000000000000000012231530233007160 5ustar debian/bip.docs0000644000000000000000000000003712230514304010604 0ustar AUTHORS BUGS NEWS README TODO debian/watch0000644000000000000000000000014112230525646010220 0ustar version=3 https://projects.duckcorp.org/projects/bip/files .*bip-([0-9]+\.[0-9]+\.[0-9]+).tar.gz debian/README.Debian0000644000000000000000000000535512230514304011231 0ustar This README file explains the basics of bip configuration. Bip can be used in two different way: - Unix service style with and init.d scripts and the logs in /var/log - Old school bnc user style: easy and straightforward. This small README file explains both type of usage. * With the old school type: ************************** - you do not need the root privileges. - gives easy access to the logs of the users of this bip to the one owning the shell. - Still the preferred type. If you are using a distribution package, the bip.conf sample configuration file is likely to be shipped in /usr/share/doc/bip/examples/bip.conf.gz or something similar. Create your bip configuration an log directory: # mkdir -p ~/.bip/logs Put the uncompressed configuration file in your ~/.bip directory (its path should be ~/.bip/bip.conf), and edit it. When you are done editing the configuration, you can start bip normally: # bip Using the default (or sample file) configuration, logs are in ~/.bip/logs/ See "Understand the configuration file" below to configure bip.conf * With the new Unix type: ************************ - bip is started automatically on boot, as a classical service - logs in /var/log/bip, keeps users out. For this configuration, you need to edit /etc/bip.conf. This particular file might contain some user password so check its permissions. Edit /etc/default/bip and set ENABLED=1. See "Understand the configuration file" below to configure bip.conf * Understand the configuration file. ************************************ Most importantly the "user" section that contains information about you and the servers you will want to connect to. The "name" field in the "user" section is your login to connect to bip. The "password" field is a hash of the password you will use to connect to bip. To generate a hash value from a password, use bipmkpw, program which comes in the bip package and source. The "name" field of the "connection" subsections are the server identifier for when you connect to bip. Once bip starts, it connects to the different servers you defined in "connection". Then you want to use your regular irc client and connect to bip. Point your client to the machine bip is running and set the proper port number (defined in your bip.conf). You should then configure the client to use a specific irc server password constructed this way: user:password:network The user is the name field of the "user" section, the password is the clear password that you used to generate the hash you entered in the "password" field of the same user section (the hash is generated with bipmkpw) and the network is the "name" field of the "connection" subsection. This is how bip authenticates you and puts your client to the correct network. Happy ircing! debian/clean0000644000000000000000000000004012230514304010157 0ustar src/conf.c src/conf.h src/lex.c debian/bipgenconfig.10000644000000000000000000000067212230514304011701 0ustar .TH BIP 1 "10 October 2005" .SH NAME bipgenconfig \- BIP IRC Proxy configuration program .SH SYNOPSIS \fBbipgenconfig\fP .SH DESCRIPTION bipgenconfig will help you build a configuration file for BIP IRC Proxy .SH SEE ALSO bip, bip.conf, bipmkpw .SH AUTHOR Arnaud 'nohar' Cornet Loïc 'Kyoshiro' Gomez Thanks to jj, YS and lafouine, for hanging around while we were coding. Crypto shamelessly taken from Christophe 'sexy' Devine. debian/bip.manpages0000644000000000000000000000006112230514304011444 0ustar bip.1 bip.conf.5 debian/bipgenconfig.1 bipmkpw.1 debian/changelog0000644000000000000000000001770212231530072011042 0ustar bip (0.8.9-1) unstable; urgency=low * New upstream release (Closes: #710614): - removed 'CVE-2012-0806.patch' included upstream. * Added missing build dependency on autoconf-archive. * Don't build with Werror (override upstream's default). * Use autoreconf et autotools files to update buildsys files. * Do not restart on upgrade anymore: let the admin check the config and break connections only when fully ready. * Updated upstream URL and watch file. * Added VCS information (Closes: #678290). * Created a debug package and bump the compat level to 9 (useful improvements for the symbols file). * Updated copyright file to record the current maintainer. * Bumped Standards-Version to 3.8.4.0 (no changes). * Added myself as uploader. * debian/dirs was meant for the pre-dbg package, renamed. * Reworked init script (exit codes, messages, leftover pidfile, cleanup). * Don't load '/etc/default/rcS' directly in init script, use '/lib/init/vars.sh' to ensure proper default values. -- Marc Dequènes (Duck) Tue, 22 Oct 2013 19:04:56 +0200 bip (0.8.8-2) unstable; urgency=high * Fix CVE-2012-0806: buffer overflow. Thanks to Julien Tinnes for reporting it. -- Pierre-Louis Bonicoli Mon, 23 Jan 2012 21:14:41 +0100 bip (0.8.8-1) unstable; urgency=low * New upstream release. -- Pierre-Louis Bonicoli Tue, 12 Apr 2011 18:18:32 +0200 bip (0.8.7-1) unstable; urgency=low * New upstream release which fix DOS. * Drop armel.patch, now upstream. -- Pierre-Louis Bonicoli Sat, 15 Jan 2011 17:41:30 +0100 bip (0.8.6-2) unstable; urgency=low * New maintainer (with Nohar's blessing). * Add armel.patch: fix build errors on armel (Closes: #597262). -- Pierre-Louis Bonicoli Wed, 22 Sep 2010 11:15:15 +0200 bip (0.8.6-1) unstable; urgency=low * New upstream release (Closes: #595409). -- Arnaud Cornet Sun, 12 Sep 2010 17:58:22 +0100 bip (0.8.5-1) unstable; urgency=low * New upstream release (Closes: #592063). * Bump standards version, no change needed. -- Arnaud Cornet Sat, 07 Aug 2010 12:29:33 +0100 bip (0.8.4-1) unstable; urgency=low [ Pierre-Louis Bonicoli ] * New upstream release (Closes: #578929). * Switch to dpkg-source 3.0 (quilt) format * Fix watch format * Bump standards version, no change needed. * Remove Build-Depends quilt * simplify debian/rules moving some part of debian/rules to debian/{clean,dirs,install} * Switch to dpkg-source 3.0 (quilt) format [ Arnaud Cornet ] * Move debian/install to debian/bip.install * Delete /var/lib/bip on purge. -- Arnaud Cornet Fri, 06 Aug 2010 20:53:08 +0100 bip (0.8.2-1) unstable; urgency=low * New Upstream Version (Closes: #542291). * Fix debhelper 7 dependency version. * Add README.source * Bump standards-version, no change needed. -- Arnaud Cornet Mon, 24 Aug 2009 19:20:53 +0200 bip (0.8.1-1) unstable; urgency=low * New Upstream Version (Closes: #534187). * Fix README.Debian: use the cleartext of the password to connect, the hash is in conf only. * Bump standards version, no change needed. * Switch to debhelper 7, remove cdbs build dep. * Add debian/bip.docs -- Arnaud Cornet Fri, 17 Jul 2009 12:39:36 +0200 bip (0.8.0-1) unstable; urgency=low * New Upstream Version -- Arnaud Cornet Mon, 02 Mar 2009 13:06:20 +0100 bip (0.8.0~rc1-1) unstable; urgency=low * New Upstream Version. * Drop bip-fix-privmsg.patch now upstream. * Add status action in initscript (Closes: #492126). -- Arnaud Cornet Mon, 16 Feb 2009 10:29:18 +0100 bip (0.7.4-2) unstable; urgency=low * Add bip-fix-privmsg.patch (Closes: #503253). -- Arnaud Cornet Fri, 24 Oct 2008 08:55:11 +0200 bip (0.7.4-1) unstable; urgency=low * New Upstream Version * Drop bip.conf.man.fix.diff, now upstream. * Bump standards version to 3.8.0 (no change needed). -- Arnaud Cornet Sun, 29 Jun 2008 10:05:35 +0200 bip (0.7.1-1) unstable; urgency=low * New Upstream Version (Closes: #473999). -- Arnaud Cornet Wed, 02 Apr 2008 23:57:39 +0200 bip (0.7.0-1) unstable; urgency=low * New Upstream Version * Fix new upstream homepage (Closes: #444209). * Remove bip user/group on purge. * Add bipgenconfig script. This and the updated upstream README explain how to generate a SSL certificate for bip (Closes: #457610, #457602). * Move bip.conf man page in correct section (Closes: #461871). * Bump standards version (no change needed). * Change debian/copyright to UTF-8. * Fix copyright line to cope with lintian. * Use quilt, add a patch to fix a man warning in bip.conf.5. -- Arnaud Cornet Sat, 16 Feb 2008 11:43:32 +0100 bip (0.6.1-2) unstable; urgency=low * Drop .examples as they are installed by make install. * Fix indent in init script. * Add a sleep in init script for a safer restart. -- Arnaud Cornet Mon, 17 Sep 2007 21:15:52 +0200 bip (0.6.1-1) unstable; urgency=low * New Upstream Version. * Change my mail address. -- Arnaud Cornet Sun, 19 Aug 2007 18:55:55 +0200 bip (0.6.0-2) unstable; urgency=low * Cleanup sample conf file. * Indent init script. * Remove pidfile check from init script because start-stop-daemon does it already. * Add --no-start to dh_installinit, to avoid breaking upgrades (Closes: #427426). -- Arnaud Cornet Mon, 04 Jun 2007 19:51:45 +0200 bip (0.6.0-1) unstable; urgency=low * Fix typo (Closes: 416074). * Fix some output of the init script (Closes: 416075). * Remove useless call to update-rc.d (Closes: 416073). * New upstream release (Closes: 412888, 390716). * Remove patches/bip_home_arg.diff and patches/ssl_cert_path.diff gone upstream. * Add a README.Debian (Closes: 418633). * Sanitize clean rule. * Fix watchfile to use .gz files. -- Arnaud Cornet Tue, 01 May 2007 12:40:23 +0200 bip (0.5.3-4) unstable; urgency=high * Set proper permissions in postinst (Closes: #415855). -- Arnaud Cornet Fri, 23 Mar 2007 00:53:01 +0100 bip (0.5.3-3) unstable; urgency=low * Add --enable-oidentd to configure. * Create /var/run/bip at daemon start time (Closes: #385791). * Update init script and depend on lsb-base (>= 3.0-6). -- Arnaud Cornet Sat, 9 Sep 2006 11:58:19 +0200 bip (0.5.3-2) unstable; urgency=medium * Fix extremely lame bug in init script. -- Arnaud Cornet Tue, 25 Jul 2006 21:17:22 +0200 bip (0.5.3-1) unstable; urgency=low * New upstream release. * Add a watchfile (Closes: #357851). * Add bip_home_arg.diff, allows to specify a home for bip on the command line. Allows much nicer init script. * ssl_cert_path.diff, allows to specify a directory for ssl certificate path Allows much nicer init script too. * Add ${misc:Depends}. * Bump standards version. * Compat is now 5. * Don't start/restart bip on install/upgrade. -- Arnaud Cornet Tue, 11 Jul 2006 00:22:00 +0200 bip (0.5.2-2) unstable; urgency=low * Added init.d file (Closes: #357855). -- Arnaud Cornet Sat, 1 Apr 2006 19:13:33 +0200 bip (0.5.2-1) unstable; urgency=low * New upstream release -- Arnaud Cornet Wed, 08 Mar 2006 14:31:13 +0100 bip (0.5.1-1) unstable; urgency=low * New upstream release -- Arnaud Cornet Sun, 29 Jan 2006 22:25:51 +0100 bip (0.5.0-1) unstable; urgency=low * Initial release. * Change to use the bip with GPL + OpenSSL exception licence, and link to OpenSSL -- Arnaud Cornet Thu, 17 Nov 2005 15:28:19 +0100 debian/compat0000644000000000000000000000000212230525646010371 0ustar 9 debian/bip.install0000644000000000000000000000014512230535664011336 0ustar debian/tmp/usr/bin usr/ debian/tmp/usr/share usr/ debian/bip.conf /etc scripts/bipgenconfig /usr/bin debian/source/0000755000000000000000000000000012230517762010473 5ustar debian/source/format0000644000000000000000000000001412230514304011666 0ustar 3.0 (quilt) debian/bip.default0000644000000000000000000000010712230514304011276 0ustar # Set ENABLED to 1 if you want the init script to start bip. ENABLED=0 debian/bip.dirs0000644000000000000000000000000412230514304010607 0ustar etc debian/bip.conf0000644000000000000000000001110612230514304010600 0ustar # bip default config file. # Thou shoult change thy password ip = "0.0.0.0"; # To connect a client to bip, try the port below, and # be sure to set the password to the value # specified in the network you want to connect to. port = 7778; # If you set this to true, you'll only be able to connect to bip # with a SSL capable IRC client. Be sure to generate a certificate # for bip with 'make cert' client_side_ssl = false; log_level = 3; pid_file="/var/run/bip/bip.pid"; # This is where logs go. Channel and private messages will use that # configuration value as a prefix, and then log_format to determine # full log filename. log_root = "/var/log/bip/"; # Log format allows you to make log filenames depend on the log line's # attributes. Here's a list : # %u -> user name # %n -> network name # %Y -> 4 digit year # %m -> 2 digit month # %d -> 2 digit day # %c -> destination (#chan, privates, ...) #log_format = "%n/%Y-%m/%c.%d.log"; # Sets the frequency (in seconds) of log syncing (real write to kernel) #log_sync_interval = 5; # Makes bip send the log of each channel and privates while # you were not connected to the proxy upon connection. #backlog = true; # enable backlog backlog_lines = 10; # number of lines in backlog, 0 means no limit backlog_always = true; # backlog even lines already backlogged # If blreset_on_talk talking on an irc network has the same effect of issuing # /bip blreset, meaning that stuffed logged before the command won't be read # back on backlog #blreset_on_talk = false; # Network definition, a name and server info network { name = "iiens"; server { host = "irc.iiens.net"; port = 6667; }; }; network { name = "oftc"; server { host = "irc.oftc.net"; port = 6667; }; }; # Configuration example with one user who connects to two irc networks # To use the multi-server feature: # - define the connections # - chose and setup a different login for each connection # on your irc client: # - Use the multi server feature of your client, the server beeing each time # the server where bip is running. In your client setup server password to: # username:password:connectionname # - do not store the password in clear here, use the bipmkpw util to generate # a hash # User structure is grouping information for a given user user { # The name in bip of the user # This is used by bip only name = "bip`debian"; # this user's password (md5(md5("tata"))) with seed - generated by bipmkpw password = "3880f2b39b3b9cb507b052b695d2680859bfc327"; # SSL certificates checking mode for user: # - "none" to accept anything; # - "basic" to accept if the certificate is contained in the store; # In "basic" mode, encountered untrusted certificates can be added to # the store interactively by connecting a client and "trusting" them. # - "ca" to do a complete certificate chain checking with the objects # in the store below (you have to put in it every cert, CRL, up to the # root CA). You have to build your store manually, so you may prefer # using "basic" unless you're a crypto zealot... ssl_check_mode = "none"; # Location of the user's store for SSL certificate check # In "basic" mode, that must point to a single file with all trusted # certs concatenated together (the interactive "trust" appends to this # file). # In "ca" mode, it's a directory of a standard openssl store; you must # put PEM objects (certificates, CRLs...) with .pem extension and run # `c_rehash .' in it # ssl_check_store = "/home/bip`debian/.bip/trustedcerts.txt"; # These will be the default for each connections default_nick = "bip`debian"; default_user = "bip"; default_realname = "bip on debian"; # A user can have mutiple connections to irc networks. # define a connection: # connection { # name = "iiens"; # used by bip only # network = "iiens"; # which ircnet to connect to # # # these will be sent to the real server # #user = "otheruser"; # #realname = "otheruser"; # #password = "serverpassword"; # # # Some options: # #away_nick = "bip`away"; # #follow_nick = true; # #ignore_first_nick = true; # #on_connect_send = "PRIVMSG NickServ :IDENTIFY nspassword"; # # # Autojoined channels: # channel { name = "#bip"; }; # # Password protected channel # channel { # name = "#elite_UnDeRgR0uNd"; # key = "sikiour"; # }; # }; # another connection (optionnal) connection { name = "oftc"; # used by bip only network = "oftc"; # which ircnet to connect to # Some options: #away_nick = "bip`away"; #follow_nick = true; #ignore_first_nick = true; #on_connect_send = "PRIVMSG NickServ :IDENTIFY nspassword"; # Autojoined channels: channel { name = "#bip"; }; }; }; debian/bip.postrm0000644000000000000000000000036012230514304011177 0ustar #!/bin/sh set -e BIPUSER=bip BIPGROUP=bip if [ "$1" = "purge" ] ; then deluser --quiet --system "$BIPUSER" > /dev/null || true delgroup --quiet --system "$BIPGROUP" > /dev/null || true rm -rf /var/log/bip /var/lib/bip fi #DEBHELPER# debian/control0000644000000000000000000000272412230534562010600 0ustar Source: bip Section: net Priority: optional Maintainer: Pierre-Louis Bonicoli Uploaders: Arnaud Cornet , Marc Dequènes (Duck) Standards-Version: 3.9.4 Build-Depends: debhelper (>= 9), bison, flex, libssl-dev, autoconf-archive, dh-autoreconf, autotools-dev Vcs-Git: git://git.debian.org/collab-maint/bip.git Vcs-Browser: http://git.debian.org/?p=collab-maint/bip.git;a=summary Homepage: http://bip.milkypond.org/ Package: bip Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends}, adduser, lsb-base (>= 3.2-14) Description: multiuser irc proxy with conversation replay and more Bip is a IRC proxy that supports replaying logged conversation when a client connects, multiple clients on one irc server connection, It has a handy logging directory structure. It is multiuser, and has a flexible configuration. Some of its configuration can be changed at runtime with special irc commands. Package: bip-dbg Architecture: any Section: debug Priority: extra Depends: ${misc:Depends}, bip (= ${binary:Version}) Description: multiuser irc proxy with conversation replay and more (debugging symbols) Bip is a IRC proxy that supports replaying logged conversation when a client connects, multiple clients on one irc server connection, It has a handy logging directory structure. It is multiuser, and has a flexible configuration. Some of its configuration can be changed at runtime with special irc commands. debian/copyright0000644000000000000000000000257312230525646011135 0ustar This package was debianized by Arnaud Cornet on Sun, 09 Oct 2005 14:18:48 +0200. It was taken over by Pierre-Louis Bonicoli on Wed, 22 Sep 2010 11:15:15 +0200. It was downloaded from http://bip.milkypond.org/ Upstream Author: Arnaud Cornet and loïc Gomez Copyright 2008, Arnaud Cornet and loïc Gomez : This package 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; version 2 dated June, 1991. This package is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this package; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. Specific permission is granted for the GPLed code in this distribition to be linked to OpenSSL without invoking GPL clause 2(b). On Debian GNU/Linux systems, the complete text of the GNU General Public License can be found in `/usr/share/common-licenses/GPL-2'. debian/bip.lintian-overrides0000644000000000000000000000013312230514304013307 0ustar # License does have the exception clause bip binary: possible-gpl-code-linked-with-openssl debian/rules0000755000000000000000000000067312230534563010257 0ustar #!/usr/bin/make -f export DEB_CFLAGS_MAINT_PREPEND = -Wno-error %: echo dh $@ dh $@ --with autoreconf --with autotools_dev override_dh_installinit: dh_installinit --no-restart-on-upgrade --no-start override_dh_autoreconf: dh_autoreconf --as-needed override_dh_auto_configure: dh_auto_configure -- --enable-oidentd override_dh_installinit: dh_installinit --no-restart-on-upgrade override_dh_strip: dh_strip --dbg-package=bip-dbg debian/bip.postinst0000644000000000000000000000100512230514304011533 0ustar #!/bin/sh set -e BIPUSER=bip BIPGROUP=bip BIPHOME=/var/lib/bip chgrp "$BIPUSER" "$BIPHOME" 2>/dev/null || addgroup --system "$BIPUSER" chown "$BIPUSER"."$BIPGROUP" "$BIPHOME" 2>/dev/null || \ adduser --system --home "$BIPHOME" --disabled-password \ --ingroup "$BIPGROUP" "$BIPUSER" if [ ! -e /var/log/bip ] then mkdir /var/log/bip chown bip:bip /var/log/bip chmod 750 /var/log/bip fi if [ "$1" = "configure" -a "$2" = "" ] then chown root:"$BIPGROUP" /etc/bip.conf chmod 640 /etc/bip.conf fi #DEBHELPER# debian/bip.init0000644000000000000000000000622512231477026010636 0ustar #!/bin/sh ### BEGIN INIT INFO # Provides: bip # Required-Start: $local_fs $remote_fs $network # Required-Stop: $local_fs $remote_fs # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: Bip irc proxy init script # Description: This file should be used to start and stop bip in system # mode. ### END INIT INFO # Author: Arnaud Cornet PATH=/sbin:/usr/sbin:/bin:/usr/bin DESC="Bip IRC proxy" NAME=bip VARRUN=/var/run/$NAME PIDFILE=$VARRUN/$NAME.pid DAEMON=/usr/bin/$NAME DAEMON_HOME=/var/lib/$NAME DAEMON_CONFIG=/etc/bip.conf DAEMON_ARGS="-f $DAEMON_CONFIG -s $DAEMON_HOME" DAEMON_USER=bip DAEMON_GROUP=bip ENABLED=0 # Exit if the package is not installed [ -x "$DAEMON" ] || exit 0 # Exit if the configuration is missing [ -f "$DAEMON_CONFIG" ] || exit 0 # Read configuration variable file if it is present [ -r /etc/default/$NAME ] && . /etc/default/$NAME test "$ENABLED" != "0" || exit 0 # Load the VERBOSE setting and other rcS variables . /lib/init/vars.sh # Define LSB log_* functions. # Depend on lsb-base (>= 3.2-14) to ensure that this file is present # and status_of_proc is working. . /lib/lsb/init-functions bip_start() { if [ ! -e $VARRUN ] ; then # /var/run can be cleaned at reboot mkdir -p $VARRUN chown $DAEMON_USER:$DAEMON_GROUP $VARRUN fi # Return # 0 if daemon has been started # 1 if daemon was already running # 2 if daemon could not be started start-stop-daemon --start --quiet --chuid $DAEMON_USER:$DAEMON_GROUP --pidfile "$PIDFILE" --exec $DAEMON --test > /dev/null \ || return 1 start-stop-daemon --start --quiet --chuid $DAEMON_USER:$DAEMON_GROUP --pidfile "$PIDFILE" --exec $DAEMON -- $DAEMON_ARGS \ || return 2 return 0 } bip_stop() { start-stop-daemon --stop --quiet --user $DAEMON_USER --pidfile "$PIDFILE" --retry=TERM/30/KILL/5 RETVAL="$?" # cleanup in case it dies rm -f $PIDFILE return "$RETVAL" } bip_reload() { start-stop-daemon --stop --quiet --user $DAEMON_USER --pidfile "$PIDFILE" --signal 1 } case "$1" in start) log_daemon_msg "Starting $DESC" "$NAME" bip_start case "$?" in 0) log_end_msg 0 ; exit 0 ;; 1) log_warning_msg " (already running)." ; exit 0 ;; 2) log_end_msg 1 ; exit 1 ;; esac ;; stop) log_daemon_msg "Stopping $DESC" "$NAME" bip_stop case "$?" in 0) log_end_msg 0 ; exit 0 ;; 1) log_warning_msg " (not running)." ; exit 0 ;; 2) log_end_msg 1 ; exit 1 ;; esac ;; reload|force-reload) log_daemon_msg "Reloading $DESC" "$NAME" bip_reload log_end_msg $? ;; restart) log_daemon_msg "Restarting $DESC" "$NAME" bip_stop [ $? = 2 ] && log_failure_msg " (failed to stop)." && exit 1 sleep 1 bip_start case "$?" in 0) log_end_msg 0 ; exit 0 ;; 1) log_failure_msg " (failed -- old process is still running)." ; exit 1 ;; 2) log_failure_msg " (failed to start)." ; exit 1 ;; esac ;; status) # /var/run/bip/bip.pid is perm'd 600, so only use -p if readable if [ -r "$PIDFILE" ]; then status_of_proc -p "$PIDFILE" "$DAEMON" "$NAME" && exit 0 || exit $? else status_of_proc "$DAEMON" "$NAME" && exit 0 || exit $? fi ;; *) echo "Usage: /etc/init.d/$NAME {start|stop|reload|restart|status}" exit 3 ;; esac :