I have a dedicated server which is running Ubuntu 12, I've followed the Linux Dedicated Server guide ([url]http://wiki.garrysmod.com/page/Linux_Dedicated_Server_Hosting[/url]) but having troubles running the update_gmod.sh file
[lua]
temp@ubuntu:/home/steam# ./update_gmod.sh
mkdir: cannot create directory `~/server_1': No such file or directory
ERROR! Cannot create ~/server_1![/lua]
Any ideas?
My first attempt was wrong as I done it on the root account and obviously, it doesn't like that for security purposes.
This is my second attempt.
I've followed the guide entirely.
P.S - I was going to post this in the help and support section but seen it was only for issues PLAYING Garry's Mod.
Post the code of the .sh file. I believe it has the same function as a batch file in Windows so might be something wrong with the code
[lua]#!/bin/bash
# A convenience function, to save us some work
update_server(){
#Read the app id and the directory into a variable
APP_ID=$1
DIR=$2
#Create the directory, if ( it doesn't exist
if ( [ ! -d "$DIR" ]; ) then
mkdir "$DIR"
fi
#Uh-oh, looks like we didn't create the directory. Stop
if ( [ ! -d "$DIR" ]; ) then
#Tell what went wrong
echo "ERROR! Cannot create $DIR!"
#Exit with status code 1 ( which indicates an error )
exit 1
fi
#Call SteamCMD with the app ID we provided and tell it to install
./bin/steamcmd.sh +login anonymous +force_install_dir "$DIR" +app_update $APP_ID validate +quit
}
#Call update_server with the app id ( 4020 is Garry's Mod ) andthe folder we want the server in
update_server 4020 "~/server_1"
#Add any additional servers here, repeat the line above, but change the directory.
#Exit with status code 0 ( which means ok )
exit 0[/lua]
Is the folder chmoded correctly?
Yep - followed all instructions correctly.
At the bottom of the script, change
update_server 4020 "~/server_1"
to
update_server 4020 "./server_1"
Sorry, you need to Log In to post a reply to this thread.