This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

Update Pisg via channel kommand.

Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
t
tobydude
Voice
Posts: 15
Joined: Mon Jun 06, 2005 6:22 am
Location: Norway
Contact:

Update Pisg via channel kommand.

Post by tobydude »

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
User avatar
Alchera
Revered One
Posts: 3344
Joined: Mon Aug 11, 2003 12:42 pm
Location: Ballarat Victoria, Australia
Contact:

Post by Alchera »

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
t
tobydude
Voice
Posts: 15
Joined: Mon Jun 06, 2005 6:22 am
Location: Norway
Contact:

Post by tobydude »

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. :?
User avatar
Alchera
Revered One
Posts: 3344
Joined: Mon Aug 11, 2003 12:42 pm
Location: Ballarat Victoria, Australia
Contact:

Post by Alchera »

I use the following crontab entry:

Code: Select all

0 0 * * * ~/public_html/pisgchek >/dev/null 2>&1
The script I wrote:

Code: Select all

#!/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
t
tobydude
Voice
Posts: 15
Joined: Mon Jun 06, 2005 6:22 am
Location: Norway
Contact:

Post by tobydude »

Thx.
I will try that.
t
tobydude
Voice
Posts: 15
Joined: Mon Jun 06, 2005 6:22 am
Location: Norway
Contact:

Post by tobydude »

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/"
User avatar
Alchera
Revered One
Posts: 3344
Joined: Mon Aug 11, 2003 12:42 pm
Location: Ballarat Victoria, Australia
Contact:

Post by Alchera »

Code: Select all

0 0 * * * ~/pisg-0.67/pisgchek >/dev/null 2>&1
pisgchek:

Code: Select all

#!/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
t
tobydude
Voice
Posts: 15
Joined: Mon Jun 06, 2005 6:22 am
Location: Norway
Contact:

Post by tobydude »

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
User avatar
Alchera
Revered One
Posts: 3344
Joined: Mon Aug 11, 2003 12:42 pm
Location: Ballarat Victoria, Australia
Contact:

Post by Alchera »

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
t
tobydude
Voice
Posts: 15
Joined: Mon Jun 06, 2005 6:22 am
Location: Norway
Contact:

Post by tobydude »

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. :wink:
User avatar
Alchera
Revered One
Posts: 3344
Joined: Mon Aug 11, 2003 12:42 pm
Location: Ballarat Victoria, Australia
Contact:

Post by Alchera »

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: Select all

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
t
tobydude
Voice
Posts: 15
Joined: Mon Jun 06, 2005 6:22 am
Location: Norway
Contact:

Post by tobydude »

Alchera, I appreciate your. help.

(I was drunk last night, sorry) :lol:

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)
t
tobydude
Voice
Posts: 15
Joined: Mon Jun 06, 2005 6:22 am
Location: Norway
Contact:

Post by tobydude »

mm
Last edited by tobydude on Tue Jan 31, 2006 3:10 am, edited 1 time in total.
t
tobydude
Voice
Posts: 15
Joined: Mon Jun 06, 2005 6:22 am
Location: Norway
Contact:

Post by tobydude »

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)
E
ElZeRo
Voice
Posts: 24
Joined: Mon Apr 11, 2005 12:04 pm
Contact:

Post by ElZeRo »

Try this Script ->
http://www.egghelp.org/cgi-bin/tcl_arch ... oad&id=923 pisg-0.5.tcl
Pisg stats automaker. Multi-channel, ftp support, easy to configure.
Im using it ... Works fine :P
Post Reply