Commit 5464ccbf authored by HgO's avatar HgO

Merge branch '33-add-option-to-disable-hotspot' into 'unstable'

Add option to disable hotspot

See merge request !36
parents aefe0833 b2b74080
This diff is collapsed.
......@@ -223,503 +223,526 @@ msgid "VPN password:"
msgstr ""
#: neutrinet_cube_install.sh:515
msgid "Enable WiFi hotspot:"
msgstr ""
#: neutrinet_cube_install.sh:518
msgid "WiFi name:"
msgstr ""
#: neutrinet_cube_install.sh:516
#: neutrinet_cube_install.sh:519
msgid "WiFi password:"
msgstr ""
#: neutrinet_cube_install.sh:520
#: neutrinet_cube_install.sh:524
msgid "Checking if $HYPERCUBE_FILE already exists..."
msgstr ""
#: neutrinet_cube_install.sh:524
#: neutrinet_cube_install.sh:528
msgid "Found $HYPERCUBE_FILE!"
msgstr ""
#: neutrinet_cube_install.sh:527
#: neutrinet_cube_install.sh:531
msgid "Please review the details above. Are they correct?"
msgstr ""
#: neutrinet_cube_install.sh:532
#: neutrinet_cube_install.sh:536
msgid "No $HYPERCUBE_FILE found"
msgstr ""
#: neutrinet_cube_install.sh:535
#: neutrinet_cube_install.sh:539
msgid ""
"What domain name do you want to use? It will be used to host your email and "
"services"
msgstr ""
#: neutrinet_cube_install.sh:540
#: neutrinet_cube_install.sh:544
msgid ""
"You can either use your own domain, or freely use a subdomain under one of "
"the following domains:"
msgstr ""
#: neutrinet_cube_install.sh:549
#: neutrinet_cube_install.sh:553
msgid "You've chosen one of the free subdomains. Checking availability..."
msgstr ""
#: neutrinet_cube_install.sh:555
#: neutrinet_cube_install.sh:559
msgid "$domain is not available. Please choose another domain"
msgstr ""
#: neutrinet_cube_install.sh:559
#: neutrinet_cube_install.sh:563
msgid "Domain is empty. You must choose which domain you want to use."
msgstr ""
#: neutrinet_cube_install.sh:565
#: neutrinet_cube_install.sh:569
msgid "Please provide your username"
msgstr ""
#: neutrinet_cube_install.sh:566
#: neutrinet_cube_install.sh:570
msgid "This will be used to login to the user interface and access your apps"
msgstr ""
#: neutrinet_cube_install.sh:568
#: neutrinet_cube_install.sh:572
msgid ""
"Username must be composed of lowercase letters, numbers and underscores only"
msgstr ""
#: neutrinet_cube_install.sh:571
#: neutrinet_cube_install.sh:575
msgid "Please provide your first name"
msgstr ""
#: neutrinet_cube_install.sh:572
#: neutrinet_cube_install.sh:576
msgid ""
"This is mandatory. It will be used as your first name when you send emails"
msgstr ""
#: neutrinet_cube_install.sh:574
#: neutrinet_cube_install.sh:578
msgid ""
"The first name must be composed of at least two letters and can end with "
"punctuation."
msgstr ""
#: neutrinet_cube_install.sh:577
#: neutrinet_cube_install.sh:581
msgid "Please provide your last name"
msgstr ""
#: neutrinet_cube_install.sh:578
#: neutrinet_cube_install.sh:582
msgid ""
"This is mandatory. It will be used as your last name when you send emails"
msgstr ""
#: neutrinet_cube_install.sh:580
#: neutrinet_cube_install.sh:584
msgid ""
"The last name must be composed of at least two letters and can end with "
"punctuation."
msgstr ""
#: neutrinet_cube_install.sh:583
#: neutrinet_cube_install.sh:587
msgid "Please provide your user password"
msgstr ""
#: neutrinet_cube_install.sh:584 neutrinet_cube_install.sh:641
#: neutrinet_cube_install.sh:588 neutrinet_cube_install.sh:648
msgid ""
"Use a strong password! See https://ssd.eff.org/en/module/creating-strong-"
"passwords for advice"
msgstr ""
#: neutrinet_cube_install.sh:588
#: neutrinet_cube_install.sh:592
msgid "Please provide the admin password"
msgstr ""
#: neutrinet_cube_install.sh:589
#: neutrinet_cube_install.sh:593
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:593
#: neutrinet_cube_install.sh:597
msgid ""
"You will now need to enter your Neutrinet VPN certificates and credentials"
msgstr ""
#: neutrinet_cube_install.sh:594
#: neutrinet_cube_install.sh:598
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:596
#: neutrinet_cube_install.sh:600
msgid "VPN username"
msgstr ""
#: neutrinet_cube_install.sh:597
#: neutrinet_cube_install.sh:601
msgid "Usually, this is the email address you choose when ordering your VPN."
msgstr ""
#: neutrinet_cube_install.sh:599
#: neutrinet_cube_install.sh:603
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:601
#: neutrinet_cube_install.sh:605
msgid "VPN password"
msgstr ""
#: neutrinet_cube_install.sh:602
#: neutrinet_cube_install.sh:606
msgid ""
"Password you choose when ordering your VPN.\\nIf you have lost your "
"password, please contact a Neutrinet admin."
msgstr ""
#: neutrinet_cube_install.sh:609
msgid "Would you like to import the VPN certificates from a directory?"
#: neutrinet_cube_install.sh:610
msgid "The directory containing your VPN certificates must have 3 files:"
msgstr ""
#: neutrinet_cube_install.sh:611
msgid "Enter your VPN certificates' location: "
msgid "- The VPN client certificate (client.crt or user.crt)"
msgstr ""
#: neutrinet_cube_install.sh:612
msgid "- The VPN client private key (client.key or user.key)"
msgstr ""
#: neutrinet_cube_install.sh:619
msgid "Enter your VPN client certificate"
#: neutrinet_cube_install.sh:613
msgid "- The VPN server certificate (ca.crt or ca-server.crt)"
msgstr ""
#: neutrinet_cube_install.sh:620
msgid "Paste all the content of client.crt below and end with a blank line: "
#: neutrinet_cube_install.sh:614
msgid ""
"After ordering your VPN (see https://wiki.neutrinet.be/vpn/order), you "
"should have received a mail with a zip file containing your VPN certificates."
msgstr ""
#: neutrinet_cube_install.sh:624
msgid "Enter your VPN client key"
#: neutrinet_cube_install.sh:615
msgid "1. Unzip that file"
msgstr ""
#: neutrinet_cube_install.sh:625
msgid "Paste all the content of client.key below and end with a blank line: "
#: neutrinet_cube_install.sh:616
msgid ""
"2. Copy the certificates in the same directory as your private key (step 6 "
"in the link above)"
msgstr ""
#: neutrinet_cube_install.sh:628
msgid "Enter the CA server certificate"
#: neutrinet_cube_install.sh:617
msgid ""
"If you don't remember where these files are, you can follow this guide to "
"generate new certificates: https://doku.neutrinet.be/en/vpn/renew-cert"
msgstr ""
#: neutrinet_cube_install.sh:629
msgid "Paste all the content of ca.crt below and end with a blank line: "
#: neutrinet_cube_install.sh:621
msgid "Enter your VPN certificates' location: "
msgstr ""
#: neutrinet_cube_install.sh:634
#: neutrinet_cube_install.sh:632
msgid "WiFi hotspot name"
msgstr ""
#: neutrinet_cube_install.sh:635
#: neutrinet_cube_install.sh:633
msgid ""
"If you bought a WiFi antenna, this will be the name of your own WiFi hotspot"
"If you bought a WiFi antenna, this will be the name of your own WiFi "
"hotspot. If you leave this name empty, the hotspot will be disabled."
msgstr ""
#: neutrinet_cube_install.sh:637
#: neutrinet_cube_install.sh:635
msgid "WiFi name must be at most 32 letters in length"
msgstr ""
#: neutrinet_cube_install.sh:638
#: neutrinet_cube_install.sh:636
msgid "MyWunderbarNeutralNetwork"
msgstr ""
#: neutrinet_cube_install.sh:638
msgid "Do you really want to disable the WiFi hotspot?"
msgstr ""
#: neutrinet_cube_install.sh:640
msgid "The WiFi hotspot app won't be set up"
msgstr ""
#: neutrinet_cube_install.sh:647
msgid "WiFi hotspot password"
msgstr ""
#: neutrinet_cube_install.sh:643
#: neutrinet_cube_install.sh:650
msgid ""
"Password must have between 8 and 63 symbols and must not contain '{' nor '}'"
msgstr ""
#: neutrinet_cube_install.sh:644
#: neutrinet_cube_install.sh:651
msgid "myhiddensecret"
msgstr ""
#: neutrinet_cube_install.sh:646
#: neutrinet_cube_install.sh:654
msgid "Creating $HYPERCUBE_FILE file..."
msgstr ""
#: neutrinet_cube_install.sh:714
#: neutrinet_cube_install.sh:723
msgid "$HYPERCUBE_FILE created!"
msgstr ""
#: neutrinet_cube_install.sh:718
#: neutrinet_cube_install.sh:727
msgid "What hardware are you installing on?"
msgstr ""
#: neutrinet_cube_install.sh:727
#: neutrinet_cube_install.sh:736
msgid "This script doesn't support this. Please choose lime/lime2"
msgstr ""
#: neutrinet_cube_install.sh:740
#: neutrinet_cube_install.sh:749
msgid "Finding latest Yunohost $board image..."
msgstr ""
#: neutrinet_cube_install.sh:750
#: neutrinet_cube_install.sh:759
msgid "Latest Yunohost $board image is v$version!"
msgstr ""
#: neutrinet_cube_install.sh:761
#: neutrinet_cube_install.sh:770
msgid "Downloading $ynh_image_zip..."
msgstr ""
#: neutrinet_cube_install.sh:767
#: neutrinet_cube_install.sh:776
msgid "Downloading $ynh_image_sig..."
msgstr ""
#: neutrinet_cube_install.sh:776
#: neutrinet_cube_install.sh:785
msgid "Unzipping $ynh_image_zip..."
msgstr ""
#: neutrinet_cube_install.sh:783
#: neutrinet_cube_install.sh:792
msgid "Downloading internetcube scripts..."
msgstr ""
#: neutrinet_cube_install.sh:788
#: neutrinet_cube_install.sh:797
msgid "Building internetcube image..."
msgstr ""
#: neutrinet_cube_install.sh:795
#: neutrinet_cube_install.sh:811
msgid "We've got our internetcube image!"
msgstr ""
#: neutrinet_cube_install.sh:801
#: neutrinet_cube_install.sh:817
msgid "Let's flash the SD-card!"
msgstr ""
#: neutrinet_cube_install.sh:841
#: neutrinet_cube_install.sh:857
msgid "Alright! Time to prepare the cube!"
msgstr ""
#: neutrinet_cube_install.sh:842
#: neutrinet_cube_install.sh:858
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:843
#: neutrinet_cube_install.sh:859
msgid "1. Assemble the board and case"
msgstr ""
#: neutrinet_cube_install.sh:844
#: neutrinet_cube_install.sh:860
msgid "2. Insert the WiFi antenna into the USB port of the Cube's board"
msgstr ""
#: neutrinet_cube_install.sh:845
#: neutrinet_cube_install.sh:861
msgid "3. Insert the SD card into your Cube"
msgstr ""
#: neutrinet_cube_install.sh:846
#: neutrinet_cube_install.sh:862
msgid ""
"4. Connect your Cube to an ethernet cable that is connected to the internet"
msgstr ""
#: neutrinet_cube_install.sh:847
#: neutrinet_cube_install.sh:863
msgid "5. Connect the power cable to the Cube to start it"
msgstr ""
#: neutrinet_cube_install.sh:848
#: neutrinet_cube_install.sh:864
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:849
#: neutrinet_cube_install.sh:865
msgid ""
"Once the cube has started up, it will setup everything based on the answers "
"that where given"
msgstr ""
#: neutrinet_cube_install.sh:850
#: neutrinet_cube_install.sh:866
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:851
#: neutrinet_cube_install.sh:867
msgid ""
"By the time the setup is complete, you will be able to connect through the "
"vpn"
msgstr ""
#: neutrinet_cube_install.sh:853
#: neutrinet_cube_install.sh:869
msgid "Press ENTER when the cube is connected"
msgstr ""
#: neutrinet_cube_install.sh:863
#: neutrinet_cube_install.sh:879
msgid ""
"Once your cube is started up, we can search for it on the local network so "
"you can follow its progress"
msgstr ""
#: neutrinet_cube_install.sh:864
#: neutrinet_cube_install.sh:880
msgid ""
"Note that it can take a couple of minutes before the cube is discoverable"
msgstr ""
#: neutrinet_cube_install.sh:865
#: neutrinet_cube_install.sh:881
msgid ""
"Once found, you can follow the progress from the HyperCube Debug url which "
"is of the form http://<local-ip>:2486/install.html"
msgstr ""
#: neutrinet_cube_install.sh:866
#: neutrinet_cube_install.sh:882
msgid ""
"Make sure you don't block Javascript on this page if you want to follow the "
"progress!"
msgstr ""
#: neutrinet_cube_install.sh:867
#: neutrinet_cube_install.sh:883
msgid ""
"Note that even after finding it it can take a minute or so before the "
"HyperCube Debug url works"
msgstr ""
#: neutrinet_cube_install.sh:868
#: neutrinet_cube_install.sh:884
msgid "You can also easily add the ip to your hosts file"
msgstr ""
#: neutrinet_cube_install.sh:869
msgid "Do you want to search for your cube on the local network? "
#: neutrinet_cube_install.sh:885
msgid "Do you want to search for your cube on the local network?"
msgstr ""
#: neutrinet_cube_install.sh:871
#: neutrinet_cube_install.sh:887
msgid "Searching for cubes..."
msgstr ""
#: neutrinet_cube_install.sh:877
#: neutrinet_cube_install.sh:893
msgid ""
"If we found it you should be able to follow the progress at the HyperCube "
"Debug url"
msgstr ""
#: neutrinet_cube_install.sh:878
#: neutrinet_cube_install.sh:894
msgid "Do you want to continue searching?"
msgstr ""
#: neutrinet_cube_install.sh:883
#: neutrinet_cube_install.sh:899
msgid ""
"Ok! Note that the 'HyperCube Debug' url will be accessible up to four hours "
"after completion"
msgstr ""
#: neutrinet_cube_install.sh:896
#: neutrinet_cube_install.sh:912
msgid ""
"During this install, we created the $HYPERCUBE_FILE file with the personal "
"details you entered earlier"
msgstr ""
#: neutrinet_cube_install.sh:897
#: neutrinet_cube_install.sh:913
msgid ""
"You may want to keep this file if the cube insall failed, as you will no "
"longer need to enter your details."
msgstr ""
#: neutrinet_cube_install.sh:898
#: neutrinet_cube_install.sh:914
msgid ""
"This file contains the passwords you provided! For safety reasons, you "
"shouldn't keep it longer than needed!!!"
msgstr ""
#: neutrinet_cube_install.sh:900
#: neutrinet_cube_install.sh:916
msgid "Do you want to remove the $HYPERCUBE_FILE file?"
msgstr ""
#: neutrinet_cube_install.sh:902
#: neutrinet_cube_install.sh:918
msgid "Removing $HYPERCUBE_FILE..."
msgstr ""
#: neutrinet_cube_install.sh:916
#: neutrinet_cube_install.sh:932
msgid ""
"We stored some resources (Yunohost images, scripts, etc.) in the "
"$CUBE_RESOURCES_DIR folder"
msgstr ""
#: neutrinet_cube_install.sh:917
#: neutrinet_cube_install.sh:933
msgid ""
"These resources could be reused for another cube install, so you wouldn't "
"need to download everything again"
msgstr ""
#: neutrinet_cube_install.sh:919
#: neutrinet_cube_install.sh:935
msgid "Do you want to remove the $CUBE_RESOURCES_DIR folder?"
msgstr ""
#: neutrinet_cube_install.sh:921
#: neutrinet_cube_install.sh:937
msgid "Removing cube resources..."
msgstr ""
#: neutrinet_cube_install.sh:944
#: neutrinet_cube_install.sh:960
msgid "Installation aborted"
msgstr ""
#: neutrinet_cube_install.sh:954
#: neutrinet_cube_install.sh:970
msgid ""
"Alright, that's all we could do for now. We hope you'll be happy with your "
"cube!"
msgstr ""
#: neutrinet_cube_install.sh:955
#: neutrinet_cube_install.sh:971
msgid "If you have problems, don't hesitate to reach out to us at"
msgstr ""
#: neutrinet_cube_install.sh:956
#: neutrinet_cube_install.sh:972
msgid "* Our wiki: https://wiki.neutrinet.be/cube/problems"
msgstr ""
#: neutrinet_cube_install.sh:957
#: neutrinet_cube_install.sh:973
msgid "* Our Mattermost: https://chat.neutrinet.be"
msgstr ""
#: neutrinet_cube_install.sh:958
#: neutrinet_cube_install.sh:974
msgid "* On freenode: #neutrinet"
msgstr ""
#: neutrinet_cube_install.sh:959
#: neutrinet_cube_install.sh:975
msgid "* Via mail: contact@neutrinet.be"
msgstr ""
#: neutrinet_cube_install.sh:961
#: neutrinet_cube_install.sh:977
msgid ""
"And if you want to contribute to this awesome project, don't hesitate to "
"contact us ;)"
msgstr ""
#: neutrinet_cube_install.sh:969
#: neutrinet_cube_install.sh:985
msgid "CERTS"
msgstr ""
#: neutrinet_cube_install.sh:972
#: neutrinet_cube_install.sh:988
msgid "Neutrinet Cube installer"
msgstr ""
#: neutrinet_cube_install.sh:974
#: neutrinet_cube_install.sh:990
msgid "OPTIONS"
msgstr ""
#: neutrinet_cube_install.sh:976
#: neutrinet_cube_install.sh:992
msgid ""
"Download and prepare all scripts and board images needed for installing a "
"cube"
msgstr ""
#: neutrinet_cube_install.sh:977
#: neutrinet_cube_install.sh:993
msgid ""
"Next time this script is run from the same folder as it is run now, these "
"scripts and images will be used"
msgstr ""
#: neutrinet_cube_install.sh:979
#: neutrinet_cube_install.sh:995
msgid ""
"Install the custom script from <custom script path> instead of Neutrinet's "
"specifics"
msgstr ""
#: neutrinet_cube_install.sh:981
#: neutrinet_cube_install.sh:997
msgid "Show this help"
msgstr ""
#: neutrinet_cube_install.sh:985
#: neutrinet_cube_install.sh:1001
msgid "Setting up the $CUBE_RESOURCES_DIR folder..."
msgstr ""
#: neutrinet_cube_install.sh:989
#: neutrinet_cube_install.sh:1005
msgid "Downloading and preparing the $board image..."
msgstr ""
......@@ -72,7 +72,7 @@ NAME_PATTERN='^([^\W\d_]{2,30}[ ,.'\''-]{0,3})+$'
# See https://github.com/YunoHost/yunohost/blob/stretch-unstable/src/yunohost/utils/password.py
PASSWORD_PATTERN='^.{8,}$'
PASSWORD_PATTERN_DESCRIPTION=$"Password must have 8 symbols or more."
WIFI_SSID_PATTERN='^[\w\d\-_\.,!\? ]{1,32}$'
WIFI_SSID_PATTERN='^[\w\d\-_\.,!\? ]{0,32}$'
# See https://github.com/YunoHost/issues/issues/1319
WIFI_PASSWORD_PATTERN='^[^\{\}]{8,63}$'
REQUIRED_FIELD_PATTERN='^.+$'
......@@ -512,8 +512,12 @@ function show_hypercube_settings() {
echo $"Last name:" $(get_hypercube_setting yunohost.user_lastname)
echo $"VPN username:" $(get_hypercube_setting vpnclient.login_user)
echo $"VPN password:" $(get_hypercube_setting vpnclient.login_passphrase)
echo $"WiFi name:" $(get_hypercube_setting hotspot.wifi_ssid)
echo $"WiFi password:" $(get_hypercube_setting hotspot.wifi_passphrase)
echo $"Enable WiFi hotspot:" $(get_hypercube_setting hotspot.enabled)
if [[ $(get_hypercube_setting hotspot.enabled) != false ]]
then