| View previous topic :: View next topic |
| Author |
Message |
blake Master
Joined: 23 Feb 2009 Posts: 201
|
Posted: Sat Sep 11, 2010 4:35 pm Post subject: Ftp |
|
|
Hi im using an ftp script on my eggy that i found in the tcl archive however it dont seem to be uploading the files do i have to add any thing else to my eggdrop for it to beable to use ftp scripts
Edit: Restrted my eggdrop getting this error on partyline
PutinFtp.TCL: Uploading
Tcl error in script for 'timer4':
child process exited abnormally
Script below is what im using
| Code: | #This Script Upload files (default: two) to ur remote server#
#If u want Upload More Files, Just Add more lines, ex:
#DEFAULT 2:
#set onefile "file1"
#set twofile "file2"
#
#Add More Lines if u want upload more files.
#
#set threefile "file3"
#set fourfile "file4"
#
#find this line:
#global serverftp ftpuser ftpass sendtime eggpath serverpath onefile twofile
#
#and add this:
#threefile fourfile
#
#example: global serverftp ftpuser ftpass sendtime eggpath serverpath threefile fourfile
#
#And find this lines:
#puts $wurstbaum "put $eggpath/$onefile $serverpath/$twofile"
#
#and add after it's lines:
# puts $wurstbaum "put $eggpath/$threefile $serverpath/$threefile"
# puts $wurstbaum "put $eggpath/$fourfile $serverpath/$fourfile"
#
##########################################################
##########################################################
# Put every x minutes send ur files.
#
set sendtime 1
##########################################################
# Put in ur name file.
#
set onefile "fileone"
set twofile "filetwo"
##########################################################
# Now enter the hostname of the ftp server where upload.
#
set serverftp ""
##########################################################
# Username and Password for the ftp account.
#
set ftpuser ""
set ftpass ""
##########################################################
# Path of your files on your shell
#
set eggpath "/home/ircduser/Gateway/logs/"
##########################################################
# Absolute path of ur remote server FTP
#
set serverpath "/home/chatters/public_html/Logfiles/"
###################################################################
## DONT CHANGE ANYTHING BELOW UNLESS YOU KNOW WHAT YOU ARE DOING ##
###################################################################
if {[info exists putinftp_running]} {
timer $sendtime putinftp
set putinftp_running 1
}
proc putinftp { } {
global serverftp ftpuser ftpass sendtime eggpath serverpath onefile twofile
putlog "PutinFtp.TCL: Uploading"
set ftpclient [exec which ftp]
set wurstbaum [open "|$ftpclient -n $serverftp" w]
puts $wurstbaum "user $ftpuser $ftpass"
puts $wurstbaum "bin"
puts $wurstbaum "put $eggpath/$onefile $serverpath/$onefile"
puts $wurstbaum "put $eggpath/$twofile $serverpath/$twofile"
puts $wurstbaum "quit"
putlog "PutinFtp.TCL: Uploaded File"
close $wurstbaum
timer $sendtime putinftp
return 1
}
putlog "4-==PutinFtp.TCL\: v1.0 by Nor7on loaded.==-"
############################################################################
##################################################################
###
###
## Thats it.
##
#
#Contac: yournick@nor7on.org - Channel: #Madrid - Undernet. web: www.nor7on.org
|
_________________ Blake
UKEasyHosting UKStormWatch
Last edited by blake on Mon Sep 13, 2010 7:34 am; edited 1 time in total |
|
| Back to top |
|
 |
Trixar_za Op

Joined: 18 Nov 2009 Posts: 143 Location: South Africa
|
Posted: Sat Sep 11, 2010 10:05 pm Post subject: |
|
|
Maybe try removing the timer $sendtime putinftp line from proc putinftp?
It's kind of weird that a proc is calling itself with a timer within itself. Creates a pretty nasty loop I would imagine. _________________ http://www.trixarian.net/Projects |
|
| Back to top |
|
 |
blake Master
Joined: 23 Feb 2009 Posts: 201
|
Posted: Sun Sep 12, 2010 8:27 am Post subject: |
|
|
If I remove that will it stop the script sending the files every couple of minutes though as im using it to send room logs to my website
Edit done that but nothing is happening at all now _________________ Blake
UKEasyHosting UKStormWatch |
|
| Back to top |
|
 |
Trixar_za Op

Joined: 18 Nov 2009 Posts: 143 Location: South Africa
|
Posted: Sun Sep 12, 2010 10:57 am Post subject: |
|
|
You're right. Seems there is a variable missing somewhere.
Add in set putinftp_running 1 just after set serverpath "/home/chatters/public_html/Logfiles/"
Also make if {![info exists putinftp_running]} to if {[info exists putinftp_running]} (just remove the ! basically).
Now it should start the timer when the script is loaded. _________________ http://www.trixarian.net/Projects |
|
| Back to top |
|
 |
blake Master
Joined: 23 Feb 2009 Posts: 201
|
Posted: Mon Sep 13, 2010 7:35 am Post subject: |
|
|
Changed
| Code: | if {![info exists putinftp_running]} {
timer $sendtime putinftp
set putinftp_running 1
}
|
To
| Code: | if {[info exists putinftp_running]} {
timer $sendtime putinftp
set putinftp_running 1
}
|
Still getting the following error
PutinFtp.TCL: Uploading
Tcl error in script for 'timer1':
child process exited abnormally _________________ Blake
UKEasyHosting UKStormWatch |
|
| Back to top |
|
 |
blake Master
Joined: 23 Feb 2009 Posts: 201
|
Posted: Wed Sep 15, 2010 10:04 pm Post subject: |
|
|
Any one able to help with this or come up with something similar _________________ Blake
UKEasyHosting UKStormWatch |
|
| Back to top |
|
 |
|