When you start left4dead you might notice it say 'Could not locate steam binary:./steam, ignoring.' at the top. That's from the autoupdate process not working because of the game being in a subfolder and ./steam being one folder above. This following script will fix the srcds_run file to autoupdate correctly. If you want further explanation, read the link bellow.
1) Put this code in a file:
vi ./l4dautoupdate-fix.sh
You only need to modify the FILE variable in this script to match your setup.
2) chmod +x ./l4dautoupdate-fix.sh
3) make it automatically check if the auto update has been re-broken by steam updating srcds_run by putting the script in your crontab:
crontab -e
(modify to be whatever your path is)
Credit goes out to oo22 for finding the fix originally and ogre_x for packaging my auto-fix-repeatedly idea into a clean script.
original tf2 auto-update fix discussion: http://forums.srcds.com/viewtopic/6037
1) Put this code in a file:
vi ./l4dautoupdate-fix.sh
You only need to modify the FILE variable in this script to match your setup.
Code:
#!/bin/bash
PATCH_TEXT="cd ..; updatesingle; cd l4d;"
ORIGINAL_PATTERN="updatesingle$"
# Change this to your l4d srcds_run full path:
FILE="/home/hlds/l4d/srcds_run"
if [ -e $FILE ]
then
NUMBER_OF_MATCHING_LINES=$(grep -c "$PATCH_TEXT" $FILE)
NUMBER_OF_PATCHABLE_LINES=$(grep -c -e "$ORIGINAL_PATTERN" $FILE)
if [ "$NUMBER_OF_MATCHING_LINES" -eq 0 ] && [ "$NUMBER_OF_PATCHABLE_LINES" -eq 1 ]
then
echo "File exists and is not patched, will update";
sed -i.bak -e "s/$ORIGINAL_PATTERN/$PATCH_TEXT/g" $FILE
fi
fi
2) chmod +x ./l4dautoupdate-fix.sh
3) make it automatically check if the auto update has been re-broken by steam updating srcds_run by putting the script in your crontab:
crontab -e
Code:
15,45 * * * * /home/hlds/scripts/l4dautoupdate-fix.sh > /dev/null 2>&1
Credit goes out to oo22 for finding the fix originally and ogre_x for packaging my auto-fix-repeatedly idea into a clean script.
original tf2 auto-update fix discussion: http://forums.srcds.com/viewtopic/6037