Launching fx server + removing cache easily

I made a script to launch automaticly your server in linux. Even with the option to remove cache folder before launching the server. You just need to adjust the configs: the path to your path.

this is the code:

#!/bin/bash

#config
FXSERVERDATA=/home/GTA5/fx-server-data
FXSERVER=/home/GTA5/fx-server

#script

read -r -p "Do you want to remove cache folder? [y/N] " response
case "$response" in
    [yY][eE][sS]|[yY]) 
        echo "removing cache..."
		rm -r $FXSERVERDATA/cache
esac
sleep 2
echo "launching server..."
sleep 2
cd $FXSERVERDATA
bash $FXSERVER/run.sh +exec server.cfg

Download this and edit it:
RunServer.sh (373 Bytes)

I recommend to put the file in your user directory. So you can easily do

cd
bash RunServer.sh

Thanks for this, but AFAIK FXServer already clears the cache on startup.

hello very good when I try to enter the runserver for my localhost the cmd opens and closes instantly what can it be?

I told them that it worked excellently a few minutes ago. I was using HeidiSQL to load another Vrp server and I thought that this problem might have occurred.
but I’m not sure bore tora the database and reloaded but it still does not work. What I can do? Thank you very much to all.

Please mind the topic date…