<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-gb">
	<link rel="self" type="application/atom+xml" href="https://forum.eggheads.org/app.php/feed/topic/18413" />

	<title>egghelp/eggheads community</title>
	<subtitle>Discussion of eggdrop bots, shell accounts and tcl scripts.</subtitle>
	<link href="https://forum.eggheads.org/index.php" />
	<updated>2011-04-08T10:49:21-04:00</updated>

	<author><name><![CDATA[egghelp/eggheads community]]></name></author>
	<id>https://forum.eggheads.org/app.php/feed/topic/18413</id>

		<entry>
		<author><name><![CDATA[danswano]]></name></author>
		<updated>2011-04-08T10:49:21-04:00</updated>

		<published>2011-04-08T10:49:21-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=96617#p96617</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=96617#p96617"/>
		<title type="html"><![CDATA[Monitoring Eggdrop with Monit]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=96617#p96617"><![CDATA[
Hello again,<br><br>thanks buddy for the awesome script, it worked flawlessly for me but there is an issue still:<br><br>when i run the sh file as the following from root it runs fine and execute the bot but it give this error<br><div class="codebox"><p>Code: </p><pre><code>root@server [/home/eggdrop]# /bin/su eggdrop /home/eggdrop/autobot/./autobot.sh start/home/eggdrop/eggdrop/./eggdrop.sh: line 39: /bin/su: Permission deniedEggdrop v1.6.20 (C) 1997 Robey Pointer (C) 2010 Eggheads[17:38:06] --- Loading eggdrop v1.6.20 (Fri Apr  8 2011)[14:38:06] Listening at telnet port 8362 (all).[14:38:06] Module loaded: channels[14:38:06] Module loaded: dns[14:38:06] Module loaded: transfer         (with lang support)[14:38:06] Module loaded: share[14:38:06] Module loaded: server[14:38:06] Module loaded: ctcp[14:38:06] Module loaded: irc[14:38:06] Module loaded: notes            (with lang support)[14:38:06] Module loaded: console          (with lang support)[14:38:06] Module loaded: blowfish[14:38:06] Module loaded: uptime[14:38:06] RSS Syndication Script v0.5b1 (2007-12-17): Loaded.[14:38:06] NickPlus : Loaded[14:38:06] Writing channel file...[14:38:06] Userfile loaded, unpacking...[14:38:06] === eggdrop: 1 channels, 1 users.Launched into the background  (pid: 4986)</code></pre></div>/home/eggdrop/eggdrop/./eggdrop.sh: line 39: /bin/su: Permission denied<br><br>on line 39 there is<div class="codebox"><p>Code: </p><pre><code>  su $user</code></pre></div>Thanks for help, appreciate it <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=11635">danswano</a> — Fri Apr 08, 2011 10:49 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2011-04-08T02:48:05-04:00</updated>

		<published>2011-04-08T02:48:05-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=96616#p96616</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=96616#p96616"/>
		<title type="html"><![CDATA[Monitoring Eggdrop with Monit]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=96616#p96616"><![CDATA[
Have you bothered to check out the script i did?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=187">caesar</a> — Fri Apr 08, 2011 2:48 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[danswano]]></name></author>
		<updated>2011-04-07T12:06:58-04:00</updated>

		<published>2011-04-07T12:06:58-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=96614#p96614</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=96614#p96614"/>
		<title type="html"><![CDATA[Monitoring Eggdrop with Monit]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=96614#p96614"><![CDATA[
Hello dear, thanks for all replies, i've managed to run this command<br><br>su user -c /home/user/eggdrop/./eggdrop-1.6.20<br><br>and it working perfectly but monit requires a full path of the command and it means it wants it like this<br><br>/bin/su user -c /home/user/eggdrop/./eggdrop-1.6.20<br><br>but i'm getting this error after executing it.<br><br>[18:56:16] LANG: No lang files found for section core.<br><br>Eggdrop v1.6.20 (C) 1997 Robey Pointer (C) 2010 Eggheads<br>[18:56:16] --- Loading eggdrop v1.6.20 (Thu Apr  7 2011)<br>[18:56:16] * MSG534<br><br><br>any idea how can i bypass this ? <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=11635">danswano</a> — Thu Apr 07, 2011 12:06 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2011-04-07T11:56:18-04:00</updated>

		<published>2011-04-07T11:56:18-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=96613#p96613</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=96613#p96613"/>
		<title type="html"><![CDATA[Monitoring Eggdrop with Monit]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=96613#p96613"><![CDATA[
Here's a bash script that I did for you.<div class="codebox"><p>Code: </p><pre><code>#!/bin/bash# set the useruser="username"# and the path to eggdrop dirpath="/home/$user/eggdrop"function getPid {  pid=0  file=`/bin/ls $path | grep pid`  if [ -n "$file" ]; then  pid=`cat $path/$file`  fi}function getStatus {  status=0  if pidof eggdrop | grep [0-9] &gt; /dev/null; then  status=1  fi}function status {  getStatus  case "$status" in  0)  echo -e "offline"  ;;  1)  echo -e "online"  ;;  esac}function start {  getStatus  if [ "$status" -eq "0" ]; then  su $user  cd $path  rm -fr *.pid  ./eggdrop  fi}function stop {  getStatus  if [ "$status" -eq "1" ]; then  getPid  kill -9 $pid  rm -fr $path/*.pid  fi}case "$1" in   start)      start   ;;   stop)      stop   ;;   restart)      restart   ;;   status)      status   ;;   *)      echo "Usage: $0 {start|stop|status}"esac</code></pre></div>Haven't tested if it really starts/stops the bot, but it should work just fine. <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=187">caesar</a> — Thu Apr 07, 2011 11:56 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[danswano]]></name></author>
		<updated>2011-04-07T11:00:19-04:00</updated>

		<published>2011-04-07T11:00:19-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=96612#p96612</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=96612#p96612"/>
		<title type="html"><![CDATA[Monitoring Eggdrop with Monit]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=96612#p96612"><![CDATA[
Great but how i will make as one command to put it in start command for monit ?<br><br>this works:<br>su username<br> ./eggdrop<br><br>but tried:<br>su username ./eggdrop<br><br>it said<br><br>can't execute binary file<br><br>i want it as one line so i can put it in monit configuration file.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=11635">danswano</a> — Thu Apr 07, 2011 11:00 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2011-04-07T11:00:47-04:00</updated>

		<published>2011-04-07T10:47:35-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=96611#p96611</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=96611#p96611"/>
		<title type="html"><![CDATA[Monitoring Eggdrop with Monit]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=96611#p96611"><![CDATA[
You can switch from root to any user without knowing his/her password via 'su username' and do whatever you wish from there. <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><br><br>Edit: From what I've just read, something like this should do what you want:<div class="codebox"><p>Code: </p><pre><code> check process eggdrop with pidfile /home/user/eggdrop       start = "/root/eggdrop start"       stop = "/root/eggdrop stop"</code></pre></div>And in '/root/eggdrop' you create a simple start/stop shell-script like <a href="http://www.activeobjects.no/subsonic/forum/viewtopic.php?t=1546" class="postlink">here</a>.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=187">caesar</a> — Thu Apr 07, 2011 10:47 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[danswano]]></name></author>
		<updated>2011-04-07T10:27:46-04:00</updated>

		<published>2011-04-07T10:27:46-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=96610#p96610</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=96610#p96610"/>
		<title type="html"><![CDATA[Monitoring Eggdrop with Monit]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=96610#p96610"><![CDATA[
Thanks buddy, i know how to get the pid/start/stop using kill or killall but my problem is how can i start eggdrop from root shell as another user without errors.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=11635">danswano</a> — Thu Apr 07, 2011 10:27 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2011-04-07T10:24:36-04:00</updated>

		<published>2011-04-07T10:24:36-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=96609#p96609</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=96609#p96609"/>
		<title type="html"><![CDATA[Monitoring Eggdrop with Monit]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=96609#p96609"><![CDATA[
You aren't allowed to run eggdrop as root due to security issues.<br><br>#1 question: In the configuration file there's:<blockquote class="uncited"><div># Specify here the filename Eggdrop will save its pid to. If no pidfile is<br># specified, pid.(botnet-nick) will be used.<br>#set pidfile "pid.LamestBot"</div></blockquote>#2 question:<br>If your eggdrop has an user file then start it normally with './eggdrop' if not start it 1 time with './eggdrop -m' if the configuration file is eggdrop.conf and with  './eggdrop -m name-of-the-file.conf' if it's different (replace 'name-of-the-file.conf' with the actual name).<br><br>#3 question:<div class="codebox"><p>Code: </p><pre><code>kill -9 `cat pid.LamestBot`</code></pre></div>(replace pid.LamestBot with the actual file name) should do what you want <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=187">caesar</a> — Thu Apr 07, 2011 10:24 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[danswano]]></name></author>
		<updated>2011-04-07T08:03:11-04:00</updated>

		<published>2011-04-07T08:03:11-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=96606#p96606</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=96606#p96606"/>
		<title type="html"><![CDATA[Monitoring Eggdrop with Monit]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=96606#p96606"><![CDATA[
Hello everyone i would like to know how to monitor eggdrop with monit cause it's deffcult for me to do so, the eggdrop won't run as root and monit run as root by default, i have tried many shell commands to run eggdrop from root as another users but eggdrop won't boot and give error or languages missing.<br><br>monit requires some stuff to be able to monitor a script/service:<br>1. PID file (can be found)<br>2. Start command<br>3. Stop command<br><br>i was able to get all those stuff but the problem that it won't run as root or as another user from root.<br><br>anyone can help me with this? <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=11635">danswano</a> — Thu Apr 07, 2011 8:03 am</p><hr />
]]></content>
	</entry>
	</feed>
