diff --git a/README.md b/README.md index 686590d7..e6f71596 100644 --- a/README.md +++ b/README.md @@ -78,20 +78,26 @@ NodeJS does not support EOL ubuntu releases. Make sure you are on the most recen Master and all slaves: - sudo curl -sL https://deb.nodesource.com/setup_7.x | sudo -E bash - && sudo apt install -y git nodejs && git clone https://github.com/Danielv123/factorioClusterio.git && cd factorioClusterio && npm install && curl -o factorio.tar.gz -L https://www.factorio.com/get-download/latest/headless/linux64 && tar -xvzf factorio.tar.gz + sudo curl -sL https://deb.nodesource.com/setup_7.x | sudo -E bash - && sudo apt install -y git nodejs && git clone https://github.com/Danielv123/factorioClusterio.git && cd factorioClusterio && npm install && sudo npm install pm2 -g && curl -o factorio.tar.gz -L https://www.factorio.com/get-download/latest/headless/linux64 && tar -xvzf factorio.tar.gz -downloads and installs nodejs, git and clusterio. To specify a version, change "latest" in the link to a version number like 0.14.21. +downloads and installs nodejs, pm2, git and clusterio. To specify a version, change "latest" in the link to a version number like 0.14.21. **Master** - node master.js + pm2 start master.js --name master **Server Host** To download the mod for all its non vanilla features and items, (optional) node client.js download - + +To create a new instance (its own save, set of mods and config files) + node client.js start [instancename] - + +To launch an instance with pm2 + + pm2 start --name slave client.js -- start [instancename] + use `nano config.json` to change settings. diff --git a/client.js b/client.js index beadbd56..e829a8b7 100644 --- a/client.js +++ b/client.js @@ -190,6 +190,7 @@ write-data=__PATH__executable__/../../../instances/" + instance + "\r\n\ "max_players": "20", "visibility": config.visibility, "username": config.username, + "password": config.password, "token": config.usertoken, "game_password": config.game_password, "verify_user_identity": config.verify_user_identity,