<?xml version="1.0" encoding="utf-8"?>
        <?xml-stylesheet type="text/css" href="http://www.linuxevolution.org/styles/feed.css"?>
<rss version="2.0"
 xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
 xmlns:dc="http://purl.org/dc/elements/1.1/"
 xmlns:admin="http://webns.net/mvcb/"
 xmlns:atom="http://www.w3.org/2005/Atom"
>
<channel>
<title>Filed under: IRC | Linux Evolution dot org and the NSLU2</title>
<atom:link href="http://linuxevolution.org/archives/irc/index-rss.xml" rel="self" type="application/rss+xml" />
<link>http://linuxevolution.org</link>
<description></description>
<dc:language>en-us</dc:language>
<dc:creator>orvtech</dc:creator>
<dc:date>2010-12-26T18:58:30-05:00</dc:date>
<admin:generatorAgent rdf:resource="http://nanoblogger.sourceforge.net" />

<item>
<link>http://linuxevolution.org/archives/2010/04/21/znc_irc_bouncer_start_up_script/index.html</link>
<guid isPermaLink="true">http://linuxevolution.org/archives/2010/04/21/znc_irc_bouncer_start_up_script/index.html</guid>
<title>ZNC IRC Bouncer start up script.</title>
<dc:date>2010-04-21T12:52:16-05:00</dc:date>
<dc:creator>orvtech</dc:creator>
<dc:subject> Scripts, IRC, NSLU2, Linux</dc:subject>
<description><![CDATA[<p>
A few weeks a go I published an article about how to have push notifications to your iPhone from an IRC channel events. After installing and configuring ZNC I was a bit disappointed that it didn't had a start up script so I decided to write one. 
</p>
<p>
This script allows you to start, stop, reload the configuration and restart the service. lets take a look at /etc/init.d/zncd
</p>
<textarea class="bashcode"> 
#!/bin/bash
 
 ZNC_FOLDER="/usr/bin"
 ZNC_OWNR="your_user_here"
 
 if [ ! -f $ZNC_FOLDER/znc -o ! -d $ZNC_FOLDER ]
 then
 echo "ZNC startup: cannot start, it appears that it is not installed"
 exit 1
 fi
 
 case "$1" in
 start)
 echo -n "Starting ZNC: "
 su - $ZNC_OWNR -c "$ZNC_FOLDER/znc"
 touch /var/lock/subsys/ZNC
 echo "OK"
 ;;
 stop)
 echo -n "Shutdown ZNC: "
 kill -9 `ps -C znc | awk '{print $1}' | grep ^[0-9]`
 rm -f /var/lock/subsys/ZNC
 echo "OK"
 ;;
 reload)
 echo -n "Reloading ZNC:"
 kill -HUP `ps -C znc | awk '{print $1}' | grep ^[0-9]`
 echo "OK"
 ;;
 status)
 if ps -C znc > /dev/null
 then 
 echo "ZNC Bouncer is running"
 else 
 echo "ZNC Bouncer is not running"
 fi
 ;;
 restart)
 $0 stop
 sleep 2
 $0 start
 ;;
 *)
 echo "Usage: $0 start|stop|restart|reload|status"
 exit 1
 esac
 exit 0</textarea> 
<br /><p>
If your NSLU2 is running gentoo you could add it to the default run level like this:
</p>
<textarea style="height: 18px" class="bashcode"> 
rc-update add zncd default</textarea>
<br /><p>
The output should be something like this:
</p>
<textarea style="height: 18px" class="bashcode"> * zncd added to runlevel default</textarea> 
<br />
<p><i>
<b>Spanish version:</b> <a href="http://orvtech.com/general/script-de-arranque-para-znc-bouncer/" hreflang="es" rel="friend">script de arranque para ZNC bouncer.</a>
</i></p>]]></description>

</item>
</channel>
</rss>

