<?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/13325" />

	<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>2007-04-09T10:06:39-04:00</updated>

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

		<entry>
		<author><name><![CDATA[hotrs]]></name></author>
		<updated>2007-04-09T10:06:39-04:00</updated>

		<published>2007-04-09T10:06:39-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=71956#p71956</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=71956#p71956"/>
		<title type="html"><![CDATA[[solved] starting eggdrop not within its directory]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=71956#p71956"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>/*  cdandexec.c  change dir and execute  usage: cdandexec dir cmd [arg]  Version 1.0    (c) 2007 Björn Schreiber */#include &lt;stdio.h&gt;#include &lt;stdlib.h&gt;int main(int argc, char *argv[]) {    // check argv  if (argc &lt; 3) {   printf("usage: %s dir cmd [arg]\n", argv[0]);   return EXIT_FAILURE;  }  // chdir  if (chdir(argv[1]) != 0) {    perror("error changing dir");    return EXIT_FAILURE;  }  // execute  if (execv(argv[2], &amp;argv[2]) != 0) {    perror("error executing cmd");    return EXIT_FAILURE;  } else    return EXIT_SUCCESS;}</code></pre></div>  This is the little tool I use to start eggdrop in a chroot environment. Perhaps somebody find it useful, so I post it here.<br><br>  I'm not a C/C++ programmer, so comments are welcome <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_wink.gif" width="15" height="15" alt=";)" title="Wink">.<br><br>greets,<br>  hotrs<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8873">hotrs</a> — Mon Apr 09, 2007 10:06 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[hotrs]]></name></author>
		<updated>2007-04-05T02:48:28-04:00</updated>

		<published>2007-04-05T02:48:28-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=71821#p71821</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=71821#p71821"/>
		<title type="html"><![CDATA[[solved] starting eggdrop not within its directory]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=71821#p71821"><![CDATA[
<blockquote class="uncited"><div>you could also edit src/eggdrop.h before compile:</div></blockquote>  Yes, this was allready mentioned by <strong class="text-strong">nml375</strong>, but I want to avoid changing the source. And it doesn't solve the problems with other scripts using relative paths.<br><br>greets,<br>  hotrs<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8873">hotrs</a> — Thu Apr 05, 2007 2:48 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[DragnLord]]></name></author>
		<updated>2007-04-04T16:21:55-04:00</updated>

		<published>2007-04-04T16:21:55-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=71808#p71808</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=71808#p71808"/>
		<title type="html"><![CDATA[[solved] starting eggdrop not within its directory]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=71808#p71808"><![CDATA[
you could also edit src/eggdrop.h before compile:<br>#define LANGDIR  "./language" /* language file directory                   */<br><br>change "./language" to the full path<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=4461">DragnLord</a> — Wed Apr 04, 2007 4:21 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[hotrs]]></name></author>
		<updated>2007-04-04T15:40:47-04:00</updated>

		<published>2007-04-04T15:40:47-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=71807#p71807</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=71807#p71807"/>
		<title type="html"><![CDATA[[solved] starting eggdrop not within its directory]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=71807#p71807"><![CDATA[
Both solutions work. I can start chrootuid with a manipulated EGG_LANGDIR environment and I can put a "cd /usr/local/eggdrop" at the beginning of eggdrop.conf.<br><br>The first solution could be a problem for other scripts if they use relative paths without a way to set them - I have to test chanstats and moxxquiz. The second one has the problem that the first messages from eggdrop a shorten to "MSG XYZ", but that doesn't bother me mutch.<br><br>If I found some time at the weekend I will write the little start tool.<br><br>greets,<br>  hotrs<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8873">hotrs</a> — Wed Apr 04, 2007 3:40 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[hotrs]]></name></author>
		<updated>2007-04-04T09:15:26-04:00</updated>

		<published>2007-04-04T09:15:26-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=71803#p71803</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=71803#p71803"/>
		<title type="html"><![CDATA[[solved] starting eggdrop not within its directory]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=71803#p71803"><![CDATA[
<blockquote class="uncited"><div>Sure, you could always use the "cd" command to change current directory.<br><br>I'm not too familiar with chrootuid. I don't suppose your eggdrop inherits the environment from where chrootuid were run?</div></blockquote>  I will test both, this evening. And I will post the results here.<br>  Thx so far.<br><br>greets,<br>  hotrs<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8873">hotrs</a> — Wed Apr 04, 2007 9:15 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[nml375]]></name></author>
		<updated>2007-04-04T08:59:34-04:00</updated>

		<published>2007-04-04T08:59:34-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=71802#p71802</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=71802#p71802"/>
		<title type="html"><![CDATA[[solved] starting eggdrop not within its directory]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=71802#p71802"><![CDATA[
Sure, you could always use the "cd" command to change current directory.<br><br>I'm not too familiar with chrootuid. I don't suppose your eggdrop inherits the environment from where chrootuid were run?<br>Ie. doing something like this:<div class="codebox"><p>Code: </p><pre><code>EGG_LANGDIR=/usr/local/eggdrop/language chrootuid /chroot/eggdrop/ eggdrop /usr/local/eggdrop/eggdrop /usr/local/eggdrop/eggdrop.conf</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8052">nml375</a> — Wed Apr 04, 2007 8:59 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[hotrs]]></name></author>
		<updated>2007-04-04T08:14:00-04:00</updated>

		<published>2007-04-04T08:14:00-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=71800#p71800</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=71800#p71800"/>
		<title type="html"><![CDATA[[solved] starting eggdrop not within its directory]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=71800#p71800"><![CDATA[
<blockquote class="uncited"><div>There are a few other tricks that could be tried aswell, depending on how you start your eggie...</div></blockquote>  I use something like this:<br><div class="codebox"><p>Code: </p><pre><code>    chrootuid /chroot/eggdrop/ eggdrop /usr/local/eggdrop/eggdrop /usr/local/eggdrop/eggdrop.conf</code></pre></div>  (eggdrop was installed in /chroot/eggdrop/usr/local/eggdrop)<br><br>  If I can use a special TCL cmd in the conf file to modify the environment, perhaps I can change the current directory using another TCL cmd?<br><br>greets,<br>  hotrs<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8873">hotrs</a> — Wed Apr 04, 2007 8:14 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[nml375]]></name></author>
		<updated>2007-04-04T08:07:06-04:00</updated>

		<published>2007-04-04T08:07:06-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=71799#p71799</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=71799#p71799"/>
		<title type="html"><![CDATA[[solved] starting eggdrop not within its directory]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=71799#p71799"><![CDATA[
Well, you could access the environment variables from within tcl using the special tcl array-variable "env": ie. setting env(EGG_LANGDIR) to a new value. I'm not sure however if eggdrop has'nt already tried to load languagefiles when the main config-file is read.<br><br>There are a few other tricks that could be tried aswell, depending on how you start your eggie...<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8052">nml375</a> — Wed Apr 04, 2007 8:07 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[hotrs]]></name></author>
		<updated>2007-04-04T08:02:55-04:00</updated>

		<published>2007-04-04T08:02:55-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=71798#p71798</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=71798#p71798"/>
		<title type="html"><![CDATA[[solved] starting eggdrop not within its directory]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=71798#p71798"><![CDATA[
<blockquote class="uncited"><div>As I recall, the only way of relocating language-files is either to edit the source (LANGDIR macro in src/eggdrop.h), or use the environment variable EGG_LANGDIR</div></blockquote>  Thx for your answer. I allready have done a search BEFORE I post my question - but perhaps I missed the right key words.<br><br>  I don't want to change the directory structure (f.e. creating links direct unter /chroot/dir/) and I can't execute a shell script.<br><br>  Is it right that there is no chance for me to use EGG_LANGDIR because of the restricted user account without a home directory and without a shell, too?<br><br><br>  Seems to me the only solution is to fix the source or write a little tool which change the current directory and starts eggdrop.<br><br>greets,<br>  hotrs<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8873">hotrs</a> — Wed Apr 04, 2007 8:02 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[nml375]]></name></author>
		<updated>2007-04-04T07:38:54-04:00</updated>

		<published>2007-04-04T07:38:54-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=71796#p71796</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=71796#p71796"/>
		<title type="html"><![CDATA[[solved] starting eggdrop not within its directory]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=71796#p71796"><![CDATA[
As I recall, the only way of relocating language-files is either to edit the source (LANGDIR macro in src/eggdrop.h), or use the environment variable EGG_LANGDIR<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8052">nml375</a> — Wed Apr 04, 2007 7:38 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[rosc2112]]></name></author>
		<updated>2007-04-04T00:32:06-04:00</updated>

		<published>2007-04-04T00:32:06-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=71786#p71786</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=71786#p71786"/>
		<title type="html"><![CDATA[[solved] starting eggdrop not within its directory]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=71786#p71786"><![CDATA[
In a chroot environment, your chrooted dir is /  so your absolute path should be /modules/  and so on.  Another possibility would be ~/modules/  (~ is shorthand for /your/home/dir/ )<br><br>Edit: I might've misunderstood the question, after thinking about it for a minute, you should be able to resolve the problem with symlinks (ln -s /path/to/languagefiles/  /chrooted/dir/language)<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7395">rosc2112</a> — Wed Apr 04, 2007 12:32 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Alchera]]></name></author>
		<updated>2007-04-03T20:49:41-04:00</updated>

		<published>2007-04-03T20:49:41-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=71776#p71776</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=71776#p71776"/>
		<title type="html"><![CDATA[[solved] starting eggdrop not within its directory]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=71776#p71776"><![CDATA[
<a href="http://forum.egghelp.org/search.php" class="postlink">Search</a> the forums as this problem has been discussed previously.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3646">Alchera</a> — Tue Apr 03, 2007 8:49 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[hotrs]]></name></author>
		<updated>2007-04-05T03:10:10-04:00</updated>

		<published>2007-04-03T03:33:16-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=71764#p71764</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=71764#p71764"/>
		<title type="html"><![CDATA[[solved] starting eggdrop not within its directory]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=71764#p71764"><![CDATA[
Hi *.*.<br><br>  I try to run eggdrop in a chroot environment with a restricted user account without a shell, therefore I can't execute a shell script to change the current directory.<br><br>  I try to change all relative paths to absolute paths, f.e.<br><br>    modules/<br><br>  to<br><br>  /usr/local/eggdrop/modules/<br><br>  which seems to work, but I can't find any variable for the language directory and eggdrop nag about missing language files.<br><br>  Is there a chance to change the language files directory? Or perhaps I can change the current directory with a tcl statement at the begining of the conf file?<br><br><br>thx,<br>  hotrs<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8873">hotrs</a> — Tue Apr 03, 2007 3:33 am</p><hr />
]]></content>
	</entry>
	</feed>
