Raised This Month: $51 Target: $400
 12% 

HLTV crontab script


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
ghostofmybrain
Veteran Member
Join Date: Mar 2010
Old 04-15-2012 , 14:24   HLTV crontab script
Reply With Quote #1

I am attempting to start an HLTV server with a script so I can execute it through crontab should I happen to reboot the machine.

Normally, if I try to start HLTV, I have to launch screen, and then execute the command

Code:
export LD_LIBRARY_PATH=".:LD_LIBRARY_PATH"
before using the hltv start command. (If I don't, it errors out, which is a common known issue with hltv on linux.)

I am trying to do that in a bash script.

If my script reads like this, it launches a screen instance, but of course fails to launch the HLTV server because of the known errors without exporting that library.
Code:
#!/bin/bash

screen -X -S aim quit
sleep 4
cd /home/gamer/hltv/cstrike/aim
/usr/bin/screen -dmS aim ./hltv +exec hltv_aim.cfg -port 27021
The minute I add the export, it no longer launches the screen.

Code:
#!/bin/bash

screen -X -S aim quit
sleep 4
cd /home/gamer/hltv/cstrike/aim
/usr/bin/screen -dmS aim export LD_LIBRARY_PATH=".:LD_LIBRARY_PATH" && ./hltv +exec hltv_aim.cfg -port 27021
Instead, it ignores the screen command, ignores the export command, and instead attempts to launch the hltv in the current window. (Which of course fails.)

Any ideas how to use a script to launch an HLTV?
__________________
Boycott ESEA
My servers
ghostofmybrain is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 11:24.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode