| View previous topic :: View next topic |
| Author |
Message |
tobydude Voice
Joined: 06 Jun 2005 Posts: 15 Location: Norway
|
Posted: Fri Jan 27, 2006 3:43 am Post subject: Update Pisg via channel kommand. |
|
|
Hi.
Is it possible to make a botscript that execute the ./pisg kommand on the shell? I was thinking to execute it in the channel by using !pisg
toby |
|
| Back to top |
|
 |
Alchera Revered One

Joined: 11 Aug 2003 Posts: 3344 Location: Ballarat Victoria, Australia
|
Posted: Fri Jan 27, 2006 8:13 am Post subject: |
|
|
Why? It's a simple matter of having a crontab do the work. _________________ Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM |
|
| Back to top |
|
 |
tobydude Voice
Joined: 06 Jun 2005 Posts: 15 Location: Norway
|
Posted: Fri Jan 27, 2006 9:43 am Post subject: |
|
|
You are of course right.
If i want to run pisg once a day at 23:59 , how will the crontab look like?
My crontab as it is now on the shell:
0 1 * * * * /home/tessa/pisg-0.67/pisg --silent
And it dont work.  |
|
| Back to top |
|
 |
Alchera Revered One

Joined: 11 Aug 2003 Posts: 3344 Location: Ballarat Victoria, Australia
|
Posted: Fri Jan 27, 2006 11:32 am Post subject: |
|
|
I use the following crontab entry:
| Code: | | 0 0 * * * ~/public_html/pisgchek >/dev/null 2>&1 |
The script I wrote:
| Code: | #!/bin/sh
statsbin="./pisg"
statpath="/home/Barry/public_html"
cd $statpath
$statsbin |
The crontab checks once per day at midnight. You'd need to alter the path in the script and crontab entry for your setup. _________________ Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM |
|
| Back to top |
|
 |
tobydude Voice
Joined: 06 Jun 2005 Posts: 15 Location: Norway
|
Posted: Fri Jan 27, 2006 3:27 pm Post subject: |
|
|
Thx.
I will try that. |
|
| Back to top |
|
 |
tobydude Voice
Joined: 06 Jun 2005 Posts: 15 Location: Norway
|
Posted: Sat Jan 28, 2006 9:45 am Post subject: |
|
|
Hi again.
What shall I put where I have the questionmarks?
0 0 * * * /home/tessa/pisg-0.67/?? >/dev/null 2>&1
Shall I put "./pisg" , there?
The pat to the pisg execute is:
statpath="/home/tessa/pisg-0.67/" |
|
| Back to top |
|
 |
Alchera Revered One

Joined: 11 Aug 2003 Posts: 3344 Location: Ballarat Victoria, Australia
|
Posted: Sat Jan 28, 2006 11:01 am Post subject: |
|
|
| Code: | | 0 0 * * * ~/pisg-0.67/pisgchek >/dev/null 2>&1 |
pisgchek:
| Code: | #!/bin/sh
statsbin="./pisg"
statpath="/home/tessa/pisg-0.67/"
cd $statpath
$statsbin |
pisgchek & pisg reside in the same directory and chmod 755 both files to make them executable. _________________ Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM |
|
| Back to top |
|
 |
tobydude Voice
Joined: 06 Jun 2005 Posts: 15 Location: Norway
|
Posted: Sat Jan 28, 2006 11:39 am Post subject: |
|
|
While rehashing the bot after installing the script: (miki)
[16:36] Tcl error in file 'miki.conf':
[16:36] invalid command name "statsbin="./pisg""
while executing
"statsbin="./pisg" "
(file "scripts/statcron.tcl" line 3)
invoked from within
"source scripts/statcron.tcl"
(file "miki.conf" line 1368)
[16:36] * CONFIG FILE NOT LOADED (NOT FOUND, OR ERROR)
"My" script and crontabentry:
#!/bin/sh
statsbin="./pisg"
statpath="/home/tessa/pisg-0.67/"
cd $statpath
$statsbin
# 0 0 * * * /home/tessa/pisg-0.67/pisgchek >/dev/null 2>&1 |
|
| Back to top |
|
 |
Alchera Revered One

Joined: 11 Aug 2003 Posts: 3344 Location: Ballarat Victoria, Australia
|
Posted: Sat Jan 28, 2006 11:52 am Post subject: |
|
|
What is statcron.tcl? What I posted has nothing to do with any TCL scripts. My post simply shows how to execute pisg once per day (and it works *if* pisg & pisgchek are located in the same dir).
NB: My "script" cannot be loaded/run by eggdrop. _________________ Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM |
|
| Back to top |
|
 |
tobydude Voice
Joined: 06 Jun 2005 Posts: 15 Location: Norway
|
Posted: Sat Jan 28, 2006 12:13 pm Post subject: |
|
|
hmm...
Can you fix it for me?
EDITED: You do not post your account login information publicly in any forums.
Mybe IŽll learn something.  |
|
| Back to top |
|
 |
Alchera Revered One

Joined: 11 Aug 2003 Posts: 3344 Location: Ballarat Victoria, Australia
|
Posted: Sat Jan 28, 2006 10:23 pm Post subject: |
|
|
I think you misunderstand what pisg actually is. pisg is a Perl IRC Statistics Generator that uses eggdrops' logs to create an index.html making it available via the WWW. eggdrop has nothing to do with pisg other than the fact that the generated log files are read by pisg.
For the whole thing to work you also need Apache running on your account and it's preferable you pop the pisg files into a public_html folder.
The following settings are also needed in your bots' conf:
| Code: | set max-logs 365
set max-logsize 0
set quick-logs 0
set raw-log 0
logfile mco * "logs/miki.log"
logfile jpk #Channel "stats/channel.log"
# Use this feature to timestamp entries in the log file.
set log-time 1
# If you want to keep your logfiles forever, turn this setting on. All
set keep-all-logs 1 |
Notice that I created a directory called 'stats' and have all the logs to be used by pisg stored in it; keeps it separate from the normal bot logs.
I suggest you read carefully *all* documentation here: http://pisg.sourceforge.net/ _________________ Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM |
|
| Back to top |
|
 |
tobydude Voice
Joined: 06 Jun 2005 Posts: 15 Location: Norway
|
Posted: Sat Jan 28, 2006 11:14 pm Post subject: |
|
|
Alchera, I appreciate your. help.
(I was drunk last night, sorry)
Unfortunately my shellaccount have been closed because someone
on the forum has tryed to "hack" my account. Heh.
I didnt think any user on this forum even did care about logging
in to my account.
(And yes, I DID learn something. Never post login information on a forum) |
|
| Back to top |
|
 |
tobydude Voice
Joined: 06 Jun 2005 Posts: 15 Location: Norway
|
Posted: Mon Jan 30, 2006 10:57 am Post subject: |
|
|
mm
Last edited by tobydude on Tue Jan 31, 2006 3:10 am; edited 1 time in total |
|
| Back to top |
|
 |
tobydude Voice
Joined: 06 Jun 2005 Posts: 15 Location: Norway
|
Posted: Mon Jan 30, 2006 11:01 am Post subject: |
|
|
Is the meaning that the code should be added in the bots config-file?
I use mirclog.tcl and the logfile is in /home/tessa/miki/mircstatlog/
(My account is open again) |
|
| Back to top |
|
 |
ElZeRo Voice
Joined: 11 Apr 2005 Posts: 24
|
|
| Back to top |
|
 |
|