Commit a1cb548f authored by HgO's avatar HgO

Merge branch 'unstable' into 'stable'

Release changes for install party 19/01/2020

Closes #18, #15, #14, #13, #10, #16, and #11

See merge request !22
parents 53557c43 94cd9806
......@@ -8,32 +8,91 @@ A script to easily install Neutrinet internetcubes
# Requirements
You will need the following packages installed on your system:
```
sudo apt install git curl jq unzip
```
You will need the packages `git`, `curl`, `jq`, `unzip`, `gpg` installed on your system.
In addition, some parts of this script require sudo access to be executed.
# About this script
This script is meant to make it easier to install a Neutrinet internet cube. Download the neutrinet_cube_install.sh script, run it, and follow the instructions.
```bash
bash neutrinet_cube_install.sh
On Debian based distributions you can run
```shell
sudo apt install git curl jq unzip gpg
```
This will create a subfolder `cube_resources` containing the install-sd.sh script and the internetcube images for your board.
It is possible to provide the directory containing your VPN certificates:
```
bash neutrinet_cube_install.sh -d <path/to/your/certificates>
# How to use this script
## What the script does
The script will ask several questions needed to set up the Neutrinet cube, including usernames and passwords.
A file called `install.hypercube` will be created containing this information.
If an `install.hypercube` is already found, you'll be asked if you want to reuse these answers first.
If you choose to reuse the answers, the script won't ask the questions again.
Questions that will be asked and stored in the `install.hypercube` file are:
* What domain to use. If you do not have your own domain, you can get a free subdomain under `.nohost.me`, `.noho.st` or `.ynh.fr`.
* A username for the first user on the cube
* Your firstname and lastname. These are the firstname and lastname that will be configured on the cube. You can give any names you want, but it can't be blank.
* A password for this user
* A password for the admin interface
* Your Neutrinet VPN credentials
* A name and password for the wifi hotspot
The script will then download several resources in order to set up the image to install and configure the cube.
These files will be kept in a folder called `cube_resources`.
If you run the script with this folder already present, it will try to find the files there instead of downloading everything again.
Once everything is set up, the script will ask you to insert your micro-SD card and flash the image on it.
Once this is done, you can assemble your cube and let the script look for your cube on the network.
You can follow the progress of the configuration via `http://<cube-ip>:2468/install.html`. Make sure you have Javascript enabled for this.
When the script has either finished or has failed, it will ask you if you want to remove the `cube_resources` folder and `install.hypercube` file.
A good reason to keep the `cube_resources` folder is if you want to do multiple installation.
A good reason to keep the `install.hypercube` file is if the script failed for some reason and you want to rerun it.
Note that the `install.hypercube` file has your passwords, so you shouldn't keep it longer than needed!
It can take about two hours from downloading and running the script until the Neutrinet cube is fully installed and configured.
## Downloading the script
The easiest way to get the script is by cloning the whole project and navigate to it.
```shell
git clone https://git.domainepublic.net/Neutrinet/neutrinet_cube_install
cd neutrinet_cube_install
```
If you are planning on installing multiple cubes, you may consider dedicating a folder on your PC/laptop for this and run
```bash
## Running the script
After you cloned the package, you can run the script and follow the instructions
```shell
bash neutrinet_cube_install.sh
```
If you are planning on installing multiple cubes at a later time, you may consider dedicating a folder on your PC/laptop for this and run
```shell
bash neutrinet_cube_install.sh -p
```
This will download the install-sd.sh and internetcube images for lime and lime2. Everything will be stored in the `cube_resources` subfolder.
This will create a `cube_resources` folder and already download and prepare as much as possible.
For more information you can use the -h option:
```bash
```shell
bash neutrinet_cube_install.sh -h
```
## Running the script using translations
You can change the language of this script with the `LANGUAGE` environment variable. For French you can do
```shell
LANGUAGE=fr bash neutrinet_cube_install.sh
```
# Contributing
## Adding translations
You can start a translation by using the template translation file `locale/neutrinet.pot`.
You can open it with [poedit](https://poedit.net/) to start a translation.
This template file can be generated with:
```shell
bash --dump-po-strings neutrinet_cube_install.sh | msguniq -o locale/neutrinet.pot
```
## Bugs, features and issues
* Bugs, feature requests and other issues can be logged on the issue tracker at https://git.domainepublic.net/Neutrinet/neutrinet_cube_install/issues
* Merge requests should be submitted to the `unstable` branch https://git.domainepublic.net/Neutrinet/neutrinet_cube_install/
This diff is collapsed.
#: neutrinet_cube_install.sh:195
msgid "Binary characters are not allowed"
msgstr ""
#: neutrinet_cube_install.sh:203
msgid "Input doesn't match pattern $pattern"
msgstr ""
#: neutrinet_cube_install.sh:228
msgid "Confirm your password"
msgstr ""
#: neutrinet_cube_install.sh:233
msgid "Passwords mismatch!"
msgstr ""
#: neutrinet_cube_install.sh:271
msgid "Invalid choice!"
msgstr ""
#: neutrinet_cube_install.sh:283
msgid "Do you really want to continue with the installation?"
msgstr ""
#: neutrinet_cube_install.sh:293
msgid "Verifying file integrity for $filename..."
msgstr ""
#: neutrinet_cube_install.sh:296
msgid "Couldn't verify file integrity of $filename!!!"
msgstr ""
#: neutrinet_cube_install.sh:299
msgid "File integrity successfully verified!"
msgstr ""
#: neutrinet_cube_install.sh:307
msgid "Verifying GPG signature for $filename..."
msgstr ""
#: neutrinet_cube_install.sh:314
msgid ""
"Couldn't import Yunohost GPG key ($GPG_YUNOHOST_KEY) from $GPG_KEYSERVER"
msgstr ""
#: neutrinet_cube_install.sh:322
msgid "Couldn't verify GPG signature!!!"
msgstr ""
#: neutrinet_cube_install.sh:325
msgid "GPG signature successfully verified!"
msgstr ""
#: neutrinet_cube_install.sh:332
msgid "sudo command is required"
msgstr ""
#: neutrinet_cube_install.sh:336
msgid "This script needs a sudo access"
msgstr ""
#: neutrinet_cube_install.sh:340
msgid "sudo password is required"
msgstr ""
#: neutrinet_cube_install.sh:346
msgid "Downloading $INSTALL_SD_SCRIPT_NAME script..."
msgstr ""
#: neutrinet_cube_install.sh:363
msgid ""
"You are about to configure a Neutrinet Internet Cube. If you do not know "
"what this is, please visit https://neutrinet.be/en/brique for more "
"information."
msgstr ""
#: neutrinet_cube_install.sh:364
msgid "Before you start this script, we assume you have the following:"
msgstr ""
#: neutrinet_cube_install.sh:365
msgid "* Either an A20-OLinuXino-LIME or an A20-OLinuXino-LIME2 board"
msgstr ""
#: neutrinet_cube_install.sh:366
msgid "* 5V DC power supply for the board"
msgstr ""
#: neutrinet_cube_install.sh:367
msgid "* Minimum 16G micro sd card"
msgstr ""
#: neutrinet_cube_install.sh:368
msgid "* Wifi USB antenna"
msgstr ""
#: neutrinet_cube_install.sh:369
msgid "* Preferably a case"
msgstr ""
#: neutrinet_cube_install.sh:370
msgid "* Optionally a neutrinet VPN account and certificates"
msgstr ""
#: neutrinet_cube_install.sh:372
msgid ""
"You also need an internet connection on this machine while running the "
"script and an ethernet connection for the cube. Preferably the cube will be "
"on the same local network as this machine. You also need to be able to "
"connect the micro sd card to this machine."
msgstr ""
#: neutrinet_cube_install.sh:374
msgid ""
"/!\\\\ Be aware that as soon as the vpn goes live the root user can log in "
"over the vpn with the chosen password! Choosing a dictionary word or "
"12345678 is not the best thing to do here, instead have a look at https://"
"ssd.eff.org/en/module/creating-strong-passwords for advice on creating a "
"strong password."
msgstr ""
#: neutrinet_cube_install.sh:376 neutrinet_cube_install.sh:401
msgid "Press ENTER to continue or CTRL-C to abort"
msgstr ""
#: neutrinet_cube_install.sh:381
msgid "Checking dependencies..."
msgstr ""
#: neutrinet_cube_install.sh:389
msgid "Checking $dep..."
msgstr ""
#: neutrinet_cube_install.sh:393
msgid "Missing deps so far: $missing_deps"
msgstr ""
#: neutrinet_cube_install.sh:400
msgid ""
"There are dependencies missing. Please install the following before "
"continuing:$missing_deps"
msgstr ""
#: neutrinet_cube_install.sh:405
msgid "Dependencies OK"
msgstr ""
#: neutrinet_cube_install.sh:447
msgid "Either the location is wrong or it is not a directory"
msgstr ""
#: neutrinet_cube_install.sh:451
msgid "Importing VPN certificates from '$certs_dir'..."
msgstr ""
#: neutrinet_cube_install.sh:455
msgid "Cannot find VPN client certificate (client.crt or user.crt)"
msgstr ""
#: neutrinet_cube_install.sh:461
msgid "Cannot find VPN client key (client.key or user.key)"
msgstr ""
#: neutrinet_cube_install.sh:467
msgid "Cannot find VPN server certificate (ca.crt or ca-server.crt)"
msgstr ""
#: neutrinet_cube_install.sh:478
msgid "Domain:"
msgstr ""
#: neutrinet_cube_install.sh:479
msgid "Admin password:"
msgstr ""
#: neutrinet_cube_install.sh:480
msgid "Username:"
msgstr ""
#: neutrinet_cube_install.sh:481
msgid "User password:"
msgstr ""
#: neutrinet_cube_install.sh:482
msgid "First name:"
msgstr ""
#: neutrinet_cube_install.sh:483
msgid "Last name:"
msgstr ""
#: neutrinet_cube_install.sh:484
msgid "VPN username:"
msgstr ""
#: neutrinet_cube_install.sh:485
msgid "VPN password:"
msgstr ""
#: neutrinet_cube_install.sh:486
msgid "WiFi name:"
msgstr ""
#: neutrinet_cube_install.sh:487
msgid "WiFi password:"
msgstr ""
#: neutrinet_cube_install.sh:491
msgid "Checking if $HYPERCUBE_FILE already exists..."
msgstr ""
#: neutrinet_cube_install.sh:495
msgid "Found $HYPERCUBE_FILE!"
msgstr ""
#: neutrinet_cube_install.sh:498
msgid "Please review the details above. Are they correct?"
msgstr ""
#: neutrinet_cube_install.sh:503
msgid "No $HYPERCUBE_FILE found"
msgstr ""
#: neutrinet_cube_install.sh:506
msgid ""
"What domain name do you want to use? It will be used to host your email and "
"services"
msgstr ""
#: neutrinet_cube_install.sh:511
msgid ""
"You can either use your own domain, or freely use a subdomain under one of "
"the following domains:"
msgstr ""
#: neutrinet_cube_install.sh:520
msgid "You've chosen one of the free subdomains. Checking availability..."
msgstr ""
#: neutrinet_cube_install.sh:526
msgid "$domain is not available. Please choose another domain"
msgstr ""
#: neutrinet_cube_install.sh:530
msgid "Domain is empty. You must choose which domain you want to use."
msgstr ""
#: neutrinet_cube_install.sh:536
msgid "Please provide your username"
msgstr ""
#: neutrinet_cube_install.sh:537
msgid "This will be used to login to the user interface and access your apps"
msgstr ""
#: neutrinet_cube_install.sh:539
msgid ""
"Username must be composed of lowercase letters, numbers and underscores only"
msgstr ""
#: neutrinet_cube_install.sh:542
msgid "Please provide your first name"
msgstr ""
#: neutrinet_cube_install.sh:543
msgid ""
"This is mandatory. It will be used as your first name when you send emails"
msgstr ""
#: neutrinet_cube_install.sh:545
msgid ""
"The first name must be composed of at least two letters and can end with "
"punctuation."
msgstr ""
#: neutrinet_cube_install.sh:548
msgid "Please provide your last name"
msgstr ""
#: neutrinet_cube_install.sh:549
msgid ""
"This is mandatory. It will be used as your last name when you send emails"
msgstr ""
#: neutrinet_cube_install.sh:551
msgid ""
"The last name must be composed of at least two letters and can end with "
"punctuation."
msgstr ""
#: neutrinet_cube_install.sh:554
msgid "Please provide your user password"
msgstr ""
#: neutrinet_cube_install.sh:555 neutrinet_cube_install.sh:612
msgid ""
"Use a strong password! See https://ssd.eff.org/en/module/creating-strong-"
"passwords for advice"
msgstr ""
#: neutrinet_cube_install.sh:557 neutrinet_cube_install.sh:562
#: neutrinet_cube_install.sh:575
msgid "Password must have 3 symbols or more."
msgstr ""
#: neutrinet_cube_install.sh:559
msgid "Please provide the admin password"
msgstr ""
#: neutrinet_cube_install.sh:560
msgid ""
"Use a strong password! See https://ssd.eff.org/en/module/creating-strong-"
"passwords for advice\\nThis will let you access the admin console of your "
"internet cube."
msgstr ""
#: neutrinet_cube_install.sh:564
msgid ""
"You will now need to enter your Neutrinet VPN certificates and credentials"
msgstr ""
#: neutrinet_cube_install.sh:565
msgid ""
"If you want to reuse certificates from a previous install, you can find "
"everything on that cube as user.crt, user.key, ca-server.crt and credentials "
"in /etc/openvpn/keys"
msgstr ""
#: neutrinet_cube_install.sh:567
msgid "VPN username"
msgstr ""
#: neutrinet_cube_install.sh:568
msgid "Usually, this is the email address you choose when ordering your VPN."
msgstr ""
#: neutrinet_cube_install.sh:570
msgid ""
"This is mandatory. If you do not have an account yet, please see: https://"
"wiki.neutrinet.be/vpn/order"
msgstr ""
#: neutrinet_cube_install.sh:572
msgid "VPN password"
msgstr ""
#: neutrinet_cube_install.sh:573
msgid ""
"Password you choose when ordering your VPN.\\nIf you have lost your "
"password, please contact a Neutrinet admin."
msgstr ""
#: neutrinet_cube_install.sh:580
msgid "Would you like to import the VPN certificates from a directory?"
msgstr ""
#: neutrinet_cube_install.sh:582
msgid "Enter your VPN certificates' location: "
msgstr ""
#: neutrinet_cube_install.sh:590
msgid "Enter your VPN client certificate"
msgstr ""
#: neutrinet_cube_install.sh:591
msgid "Paste all the content of client.crt below and end with a blank line: "
msgstr ""
#: neutrinet_cube_install.sh:595
msgid "Enter your VPN client key"
msgstr ""
#: neutrinet_cube_install.sh:596
msgid "Paste all the content of client.key below and end with a blank line: "
msgstr ""
#: neutrinet_cube_install.sh:599
msgid "Enter the CA server certificate"
msgstr ""
#: neutrinet_cube_install.sh:600
msgid "Paste all the content of ca.crt below and end with a blank line: "
msgstr ""
#: neutrinet_cube_install.sh:605
msgid "WiFi hotspot name"
msgstr ""
#: neutrinet_cube_install.sh:606
msgid ""
"If you bought a WiFi antenna, this will be the name of your own WiFi hotspot"
msgstr ""
#: neutrinet_cube_install.sh:608
msgid "WiFi name must be at most 32 letters in length"
msgstr ""
#: neutrinet_cube_install.sh:609
msgid "MyWunderbarNeutralNetwork"
msgstr ""
#: neutrinet_cube_install.sh:611
msgid "WiFi hotspot password"
msgstr ""
#: neutrinet_cube_install.sh:614
msgid ""
"Password must have between 8 and 63 symbols and must not contain '{' nor '}'"
msgstr ""
#: neutrinet_cube_install.sh:615
msgid "myhiddensecret"
msgstr ""
#: neutrinet_cube_install.sh:617
msgid "Creating $HYPERCUBE_FILE file..."
msgstr ""
#: neutrinet_cube_install.sh:685
msgid "$HYPERCUBE_FILE created!"
msgstr ""
#: neutrinet_cube_install.sh:689
msgid "Do you want to add Neutrinet's specifics to the installation?"
msgstr ""
#: neutrinet_cube_install.sh:691
msgid "Neutrinet's specifics script will be added when flashing the sd card"
msgstr ""
#: neutrinet_cube_install.sh:696
msgid "Would you like to add your own custom script?"
msgstr ""
#: neutrinet_cube_install.sh:698
msgid "Enter your custom script's location: "
msgstr ""
#: neutrinet_cube_install.sh:701
msgid "Either the location is wrong or it is not a regular file"
msgstr ""
#: neutrinet_cube_install.sh:703
msgid "Your custom script will be added when flashing the sd card"
msgstr ""
#: neutrinet_cube_install.sh:707
msgid "No custom script will be added then"
msgstr ""
#: neutrinet_cube_install.sh:716
msgid "What hardware are you installing on?"
msgstr ""
#: neutrinet_cube_install.sh:725
msgid "This script doesn't support this. Please choose lime/lime2"
msgstr ""
#: neutrinet_cube_install.sh:738
msgid "Finding latest Yunohost $board image..."
msgstr ""
#: neutrinet_cube_install.sh:748
msgid "Latest Yunohost $board image is v$version!"
msgstr ""
#: neutrinet_cube_install.sh:759
msgid "Downloading $ynh_image_zip..."
msgstr ""
#: neutrinet_cube_install.sh:765
msgid "Downloading $ynh_image_sig..."
msgstr ""
#: neutrinet_cube_install.sh:774
msgid "Unzipping $ynh_image_zip..."
msgstr ""
#: neutrinet_cube_install.sh:781
msgid "Downloading internetcube scripts..."
msgstr ""
#: neutrinet_cube_install.sh:786
msgid "Building internetcube image..."
msgstr ""
#: neutrinet_cube_install.sh:793
msgid "We've got our internetcube image!"
msgstr ""
#: neutrinet_cube_install.sh:797
msgid "Let's flash the SD-card!"
msgstr ""
#: neutrinet_cube_install.sh:818
msgid "Alright! Time to prepare the cube!"
msgstr ""
#: neutrinet_cube_install.sh:819
msgid ""
"Make sure the Cube is not connected to a power source (e.g: the power cable "
"should be unplugged)"
msgstr ""
#: neutrinet_cube_install.sh:820
msgid "1. Assemble the board and case"
msgstr ""
#: neutrinet_cube_install.sh:821
msgid "2. Insert the WiFi antenna into the USB port of the Cube's board"
msgstr ""
#: neutrinet_cube_install.sh:822
msgid "3. Insert the SD card into your Cube"
msgstr ""
#: neutrinet_cube_install.sh:823
msgid ""
"4. Connect your Cube to an ethernet cable that is connected to the internet"
msgstr ""
#: neutrinet_cube_install.sh:824
msgid "5. Connect the power cable to the Cube to start it"
msgstr ""
#: neutrinet_cube_install.sh:825
msgid ""
"It may taken a couple of minutes before the cube has started up an is "
"connected to the internet"
msgstr ""
#: neutrinet_cube_install.sh:826
msgid ""
"Once the cube has started up, it will setup everything based on the answers "
"that where given"
msgstr ""
#: neutrinet_cube_install.sh:827
msgid ""
"Complete setup can take up to an hour or even more. Please be patient. It "
"should not take two hours"
msgstr ""
#: neutrinet_cube_install.sh:828
msgid ""
"By the time the setup is complete, you will be able to connect through the "
"vpn"
msgstr ""