Commit f834a71a authored by Ilja's avatar Ilja

Include neutrinet specifics in general script

* Remove the custom neutrinet script thing
* Make sure the script creates it in the cube_resources folder and uses that one
parent 89af32ba
#!/bin/bash
# Adding neutrinet specifics
main_domain=$(yunohost tools maindomain --output=plain)
yunohost app fetchlist -n neutrinet -u https://neutrinet.be/apps.json --debug
yunohost app fetchlist --debug
yunohost app install neutrinet --force --debug --args "domain=${main_domain}&path=/neutrinet"
......@@ -56,7 +56,7 @@ INSTALL_SD_SCRIPT_NAME="install-sd.sh"
HYPERCUBE_FILE="install.hypercube"
CUSTOM_SCRIPT_PATH="${CURRENT_SCRIPT_DIR}/custom_neutrinet_specifics.sh"
CUSTOM_SCRIPT_PATH="${CUBE_RESOURCES_LOCATION}/custom_neutrinet_specifics.sh"
EXECUTE_CUSTOM_SCRIPT=true
# See https://github.com/YunoHost/yunohost/blob/master/data/actionsmap/yunohost.yml#L104
......@@ -802,6 +802,8 @@ function flash_sd_card() {
download_install_sd_script
fi
create_custom_script
local install_sd_options=(-y "$HYPERCUBE_FILE" -f $CUBE_RESOURCES_LOCATION/$image)
if $EXECUTE_CUSTOM_SCRIPT
then
......@@ -816,6 +818,20 @@ function flash_sd_card() {
"./$CUBE_RESOURCES_LOCATION/$INSTALL_SD_SCRIPT_NAME" "${install_sd_options[@]}"
}
function create_custom_script() {
cat << "EOF" > $CUSTOM_SCRIPT_PATH
#!/bin/bash
# Adding neutrinet specifics
main_domain=$(yunohost tools maindomain --output=plain)
yunohost app fetchlist -n neutrinet -u https://neutrinet.be/apps.json --debug
yunohost app fetchlist --debug
yunohost app install neutrinet --force --debug --args "domain=${main_domain}&path=/neutrinet"
EOF
}
function prepare_cube() {
info $"Alright! Time to prepare the cube!"
info $"Make sure the Cube is not connected to a power source (e.g: the power cable should be unplugged)"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment