[csw-devel] SF.net SVN: opencsw:[296] ircbot/add-instance.sh

skayser at users.sourceforge.net skayser at users.sourceforge.net
Sat Feb 19 03:36:17 CET 2011


Revision: 296
          http://opencsw.svn.sourceforge.net/opencsw/?rev=296&view=rev
Author:   skayser
Date:     2011-02-19 02:36:17 +0000 (Sat, 19 Feb 2011)

Log Message:
-----------
ircbot: only create user database if none present

Modified Paths:
--------------
    ircbot/add-instance.sh

Modified: ircbot/add-instance.sh
===================================================================
--- ircbot/add-instance.sh	2011-02-19 02:26:43 UTC (rev 295)
+++ ircbot/add-instance.sh	2011-02-19 02:36:17 UTC (rev 296)
@@ -16,10 +16,14 @@
   -e "s,/path/to/bot,$DIRNAME," \
   $DIRNAME/template.conf >> $DIRNAME/$BOTNAME.conf
 
-echo "Adding an owner user to the bot database. You can later identify via
-echo "these credentials to the bot on IRC."
-echo
-supybot-adduser -c owner $DIRNAME/conf/users.conf
+if [ ! -f $DIRNAME/conf/users.conf ]; then
+  echo "No local user database found, creating one with an initial bot owner."
+  echo "You can later identify with these credentials to the bot on IRC."
+  echo
+  supybot-adduser -c owner $DIRNAME/conf/users.conf
+fi
 
 echo "Your bot is setup. To run it, execute:"
+echo
 echo "  supybot $DIRNAME/$BOTNAME.conf"
+echo


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.


More information about the devel mailing list