From 1fb12de15fd2192130cc451decbca2614f09908f Mon Sep 17 00:00:00 2001 From: sbystrov Date: Tue, 23 Apr 2019 18:31:26 +0300 Subject: [PATCH 1/2] Some installations don't have 'curl' from the box, so install it with tools --- source/contributed/ps_ubuntu.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/contributed/ps_ubuntu.md b/source/contributed/ps_ubuntu.md index 99b25e44..72657b37 100644 --- a/source/contributed/ps_ubuntu.md +++ b/source/contributed/ps_ubuntu.md @@ -25,7 +25,7 @@ As the system tends to be very CPU intensive it is recommended that you avoid "b The following steps will need some common build and development tools, which we'll install here. ```shell -sudo apt install -y build-essential tcl git +sudo apt install -y build-essential tcl git curl ``` From fa79621f873919568dbc9f61e0818fd2f9465307 Mon Sep 17 00:00:00 2001 From: sbystrov Date: Tue, 23 Apr 2019 18:39:23 +0300 Subject: [PATCH 2/2] Fix start screeps server command --- source/contributed/ps_ubuntu.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/source/contributed/ps_ubuntu.md b/source/contributed/ps_ubuntu.md index 72657b37..6bb009a9 100644 --- a/source/contributed/ps_ubuntu.md +++ b/source/contributed/ps_ubuntu.md @@ -193,7 +193,7 @@ After=network-online.target [Service] Type=simple WorkingDirectory=/home/screeps/world -ExecStart=/home/screeps/world/node_modules/screeps/bin/screeps.js start +ExecStart=/usr/bin/npx screeps start User=screeps Group=screeps @@ -201,6 +201,12 @@ Group=screeps WantedBy=multi-user.target ``` +Check and correct the npx path in line `ExecStart=/usr/bin/npx screeps start` with the value returned by the command- + +```shell +which npx +``` + This tells the system that the Screeps server will require networking, should run as the `screeps` user and group, what directory to start it in, and the startup command itself. We'll need to tell systemd to load the new service we just created-