Modify setup/installation script (bash) to point to newest/latest version
New here? Learn about Bountify and follow @bountify to get notified of new bounties! x

I would like to modify an existing installation script so that it installs the latest (newest) version of the Lamassu-Server software from the get-go, so I do not have to run the subsequent update script.

Here is the install script that installs the older version Lamassu-Server software;

Here is the update script that installs the newest version of the Lamassu-Server software;

The older version is 3x, and the latest version is 7x.

Please message me if you have questions.

awarded to alixaxel

Crowdsource coding tasks.

3 Solutions

Hello, When I install (sh your modified script on a DigitalOcean VPS, it suffers the same problem as alixaxel's solution, in that it does not install the lamassu-server software.
ericjarvies 3 years ago

I don't believe that the scripts need any changes. Both of them use the same exact npm install command that points to the lamassu-server repo's master branch. Accordingly to the package.json the branch is currently on version 7.1.1.

One of the differences in the update script is that it's stopping and unlinking any existing lamassu-server instances. Are you running the install script on a completely clean DigitalOcean droplet? Or is there a chance that an existing [older] installation of lamassu-server is preventing the install script from actually installing the latest version? In which case the existing lamassu-server v3 probably remains on the droplet. Meaning that you'd only need to run the update script.

In any case, here's an install script that stops and unlinks any existing lamassu-server instances, before attempting the install.

It might be helpful to post the generated log file (/tmp/install.log) of the install script if problems persist.

Winning solution

So the v7 update is basically the same, with the following two differences:

  1. It runs lamassu-migrate and lamassu-migrate-config.
  2. Changes the service command from ${NPM_BIN}/lamassu-server to /lamassu-server.

Point #1 doesn't matter since you're installing from scratch. So you only need to change two lines.

Here's a link to the updated script:

You can see the changes made here.

After running the script on a brand new DO Ubuntu 16.04, this is what I get:

Apparently, the path in supervisor needs to be prefixed with ${NPM_BIN} (/usr/bin) afterall:

I've updated the Bash script and ran it on yet another fresh install of Ubuntu 16.04:

As you can see everything is installed correctly, and the supervisor service is also running fine:

As well as the web server:

Hello, When I run your modified script, the following occurs; ` -e Starting lamassu-server install. This will take a few minutes... 03:20:20 Enabling swap file for install only... 03:20:20 Updating system... 03:20:37 Installing necessary packages... 03:21:21 Generating seed... 03:21:21 Installing latest npm package manager for node... ` Afterwards, when I run npm -g ls lamassu-server it comes up empty, e.g.- root@MX:~# npm -g ls lamassu-server /usr/lib └── (empty) So, it is not installing lamassu-server, etc., as shown here;
ericjarvies 3 years ago
@ericjarvies: I've updated the script and ran it on a fresh Ubuntu install twice. As you can see it worked flawlessly - what are you doing differently than me?
alixaxel 3 years ago
View Timeline