Jump to content

PB ET Linux Uploading SS's to website


ES Secret Squirrel

Recommended Posts

I did a quick search of the old messages here and could not find one directly relating to my new question. (I said a quick search, this may have already been answered)

 

We are trying to configure our ET server (linux based) so that screenshots will upload to a public ftp site so that lower level admins can take SS's and view them quickly. Has anyone looked into this before?

 

Thanks much ahead of time for any assistance.

 

]ES[ Secret Squirrel

Matt

Link to comment
Share on other sites

  • Replies 53
  • Created
  • Last Reply

Top Posters In This Topic

you can use pb_sv_sscmd and code script to upload them.

 

PB_SV_SsCmd [Filename]

The name of the script file (default is "" empty which means "not used") that PB calls after each screen shot PNG image file is received; this can be used by admins to copy or otherwise process screenshot files that are obtained automatically during gameplay

Link to comment
Share on other sites

#!/bin/bash

 

FTP_SRV=""

FTP_LOGIN=""

FTP_PW=""

REMOTE_DIR="."

 

 

FN=`echo $1 | sed -e s/"\(\\/.*\\/\)"// `

 

ftp -np $FTP_SRV

quote USER $FTP_LOGIN

quote PASS $FTP_PW

binary

cd $REMOTE_DIR

put $1 $FN

quit

END_SCRIPT

Link to comment
Share on other sites

  • 1 month later...

We're trying it out right now, the other guy set the server up. I'm not that familiar with linux myself. What do you call the script file?

 

Thanks,

Matt

I'm interested in this too, cant get it to work though. It seems that the script is not being executed when a screenshot is captured. What am I missing? pb_sv_sscmd is set to the filename where the script is contained within the pb folder, path should be correct.

Link to comment
Share on other sites

upload that script into pb folder ( lets call it ssweb.sh and /srv/et/pb is pb_sv_homepath ).

Then

pb_sv_sscmd "pb/ssweb.sh ; sh /srv/et/pb/ssweb.sh"

Many thanks to foxdie for spending so much of his time with me on irc this afternoon helping me out. I have got the script working specifying the command as he says above.

Link to comment
Share on other sites

  • 1 month later...

I followed by the instructions and it isnt working :/...Maybe there are problems with chmods?

 

regards

 

p.s i was really trying to set it many times :/. I really care of this option, but cant run it properly :/ and dnt know whats going on...

Link to comment
Share on other sites

ok, after a conversation with foxdie we resolved the problem :). Many thanks to him. It was because of Unix line termination. So to all w!ndow$' users i recommend use:

 

http://www.freedownloadscenter.com/Utiliti...SafEEditor.html

 

to save the script :)

 

SafEEditor 1.0 is a free, barebones plain text editor for use on Windows computers to edit perl and other CGI scripts. SafEEditor saves files in plain text only with Unix line termination, keeping them safe for use with various interpreters and compilers that are prone to complaining and halting when they encounter other types of line termination or styled text in scripts or other source code. In addition to Unix line termination, UTF-8 character encoding is the default character encoding method used by SafEEditor, making it possible for non-ASCII compatible text to be safely contained within an ASCII compatible format.

Posted Image

 

regards

Edited by Luk4ward
Link to comment
Share on other sites

  • 1 month later...

this is working great!!!

 

thanks a lot!!!!

 

one thing:

would it be possible to change the script in a way, that also the html-files generated by punkbuster are tranfered (including the pbsvss.htm)?

that would be so great! i could add a link on webpage where clanmembers could access the pbsvss.htm and look there for the screenshot they want to see.

 

thx

Link to comment
Share on other sites

#!/bin/bash

FTP_SRV=""
FTP_LOGIN=""
FTP_PW=""
REMOTE_DIR="."


FN=`echo $1 | sed -e s/"\(\\/.*\\/\)"//`
FULLFN_HTM=`echo $1 | sed -e s/"\([.]png\)"/.htm/`
FN_HTM=`echo $FULLFN_HTM | sed -e s/"\(\\/.*\\/\)"//`
SVSS=`echo $1 | sed -e s/"pb[0-9]\+[.]png"/pbsvss.htm/`

ftp -np $FTP_SRV << END_SCRIPT
quote USER $FTP_LOGIN
quote PASS $FTP_PW
binary
cd $REMOTE_DIR
put $1 $FN
put $FULLFN_HTM $FN_HTM
put $SVSS pbsvss.htm
quit
END_SCRIPT
Link to comment
Share on other sites

#!/bin/bash

FTP_SRV=""
FTP_LOGIN=""
FTP_PW=""
REMOTE_DIR="." 
FN=`echo $1 | sed -e s/"\(\\/.*\\/\)"//`
FULLFN_HTM=`echo $1 | sed -e s/"\([.]png\)"/.htm/`
FN_HTM=`echo $FULLFN_HTM | sed -e s/"\(\\/.*\\/\)"//`
SVSS=`echo $1 | sed -e s/"pb[0-9]\+[.]png"/pbsvss.htm/`

ftp -np $FTP_SRV << END_SCRIPT
quote USER $FTP_LOGIN
quote PASS $FTP_PW
binary
cd $REMOTE_DIR
put $1 $FN
put $FULLFN_HTM $FN_HTM
put $SVSS pbsvss.htm
quit
END_SCRIPT
you are my hero!!!!! thanks a lot!!!! that's so great :))))))) it works very good!!!!
Link to comment
Share on other sites

geedoxx did u set any chmods? Its not working for me :/

i tested it on 2 webspaces, and one i have set chmod to 777 and the other 755. both worked for me.

the rest i made exactly like it is mentioned in this thread. and i have no idea for solving your problem :( sorry

Link to comment
Share on other sites

  • 1 month later...

Hi,

 

can any1 help me ?:(

 

I got the working script and ftp server (tested on another server), the result is:

 

[03.23.2007 13:23:24] Screenshot ./home/pb/svss/pb000181.png successfully received (MD5=65AA75817E867E1235FA44DBB8994C89) from 18 ^0fanboii!! [6fc7e6fcd8a412a3122e50830f4af1ec(?) 217.153.7.206:27960]
[03.23.2007 13:23:24] Attempted pb_sv_ssCmd (result=1) [pb/publish.sh; sh ./home/pb/publish.sh][./home/pb/svss/pb000181.png]

and it is not copying files onto another ftp, whats happening? Do they have to install smth else on linux machine? I have no idea and i really need this working :(,

 

regards

Link to comment
Share on other sites

PB_SV_SSCmd is wrong.

why its wrong?

 

16:02:02:> pb_Sv_homepath
-------------------------
PunkBuster Server: Home Path is ./home/pb/

so the cmd is:

 

pb_sv_SsCmd "pb/publish.sh; sh ./home/pb/publish.sh"
Link to comment
Share on other sites

  • 2 weeks later...

Pah fiddlesticks and cry cry cry ..... I thought i have followed instructions yet I cant get it to work either .

I have tried the PB_SV_SSCmd as quoted then i did pb_sv_homepath in hlsw and used the path it returned just like

luk4ward . and return the same : Attempted pb_sv_ssCmd (result=1) .

have you guys sorted this in private chat ? can any one who got it working offer any further help ?

I have tried various combinations yet to get a result .

I can see why i took to drinking beer and playing pool rather than continuing my computer studies A level :o

Link to comment
Share on other sites

Pah fiddlesticks and cry cry cry ..... I thought i have followed instructions yet I cant get it to work either .

I have tried the PB_SV_SSCmd as quoted then i did pb_sv_homepath in hlsw and used the path it returned just like

luk4ward . and return the same : Attempted pb_sv_ssCmd (result=1) .

have you guys sorted this in private chat ? can any one who got it working offer any further help ?

I have tried various combinations yet to get a result .

I can see why i took to drinking beer and playing pool rather than continuing my computer studies A level :o

hehe, yes. The problem is with script. Doesnt work with such path: ./home/pb. So i was talking with the admin of my host and after the advice from foxdie we changed paths. Follow this instructions:

 

1) type via rcon: path and u should got smth like this:

 

18:13:38:> path
---------------
Current search path:
./home/etpro
/home/gameservers/ET-3269/etpro/etpro-3_2_6.pk3

and

18:13:30:> pb_sv_homepath
-------------------------
PunkBuster Server: Home Path is ./home/pb/

so your NEW fs_homepath is:

 

/home/gameservers/ET-3269/

2) Propably u dnt have a pb dir in your main dir (/home/gameservers/ET-3269/), so copy past pb from the old location to the main where u have got etmain,etpro dirs

 

3) Now u just need to edit your starting command. Change

 

+ set fs_homepath ./home

to

 

+set fs_homepath /home/gameservers/ET-3269
(without '/' at the end !!!)

 

4) Set your publish file (this script in the pb dir) with 777 chmods

 

5) Change the cmd in the pb configuration file:

 

pb_sv_SsCmd "pb/publish.sh; sh /home/gameservers/ET-3269/pb/publish.sh"

that's all ;)

 

p.s oh remember to write a script with proper editor which has got Unix line termination (check previous posts)

Edited by Luk4ward
Link to comment
Share on other sites

Thnx luk4ward ....

Drat it still wont work .

[18:33:44] PunkBuster Server: Attempted pb_sv_ssCmd (result=1) [pb/ssweb.sh; sh /home/gsetpro/pb/ssweb.sh][/home/gsetpro/pb/svss/pb001432.png]

 

saves the svss fine to the game server but clearly not publishing it .

checked the path as you suggested .

path :

/home/gsetpro/etpro/etpro-3_2_6.pk3 (107 files)

/home/gsetpro/etpro

pb_sv_homepath :

18:40:26 ^3PunkBuster Server: Home Path is /home/gsetpro/pb/

 

so i set pb_sv_sscmd "pb/ssweb.sh; sh /home/gsetpro/pb/ssweb.sh" in the working pbsv.cfg

 

and put ssweb.sh in the working pb folder . eg /home/gsetpro/pb/

 

I dont get why it wont go i know my ftp is correct and login is correct .

 

Is there a recommended folder on the website? eg i set :

REMOTE_DIR="/public_html/pbss/" have i messed this bit up maybe ?

 

Any help be great as i am about to launch my laptop outa the window :angry:

Although maybe i just give up and accept lack of skills @ making this work. :unsure:

Edited by gobbo
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.