1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/duniter_ynh.git synced 2024-09-03 18:26:35 +02:00

[mod] #12: remove install path choice.

A dedicated domain name is needed and make it easier to configure.
Remove code on manifest, install and upgrade scripts.
This commit is contained in:
Moul 2017-02-21 12:58:51 +01:00
parent d10fbdc255
commit 07c73d399a
4 changed files with 1 additions and 21 deletions

View file

@ -31,16 +31,6 @@
}, },
"example": "duniter.domain.tld" "example": "duniter.domain.tld"
}, },
{
"name": "path",
"type": "path",
"ask": {
"en": "Path on which install the web admin (installable only on root path for now)",
"fr": "Chemin sur lequel ajouter ladministration web (installable uniquement à la racine)"
},
"example": "/",
"default": "/"
},
{ {
"name": "port", "name": "port",
"type": "port", "type": "port",

View file

@ -37,7 +37,6 @@ ynh_app_setting_set "$app" unprotected_uris "/"
CONFIG_NGINX_FOR_WEB_ADMIN () { CONFIG_NGINX_FOR_WEB_ADMIN () {
# Configure Nginx # Configure Nginx
nginx_conf="../conf/nginx.conf" nginx_conf="../conf/nginx.conf"
#sudo sed -i "s@YNH_EXAMPLE_PATH@$path@g" $nginx_conf
sudo sed -i "s@YNH_EXAMPLE_PORT@$port@" $nginx_conf sudo sed -i "s@YNH_EXAMPLE_PORT@$port@" $nginx_conf
sudo sed -i "s@YNH_EXAMPLE_DOMAIN@$domain@" $nginx_conf sudo sed -i "s@YNH_EXAMPLE_DOMAIN@$domain@" $nginx_conf
sudo cp $nginx_conf /etc/nginx/conf.d/$domain.d/$app.conf sudo cp $nginx_conf /etc/nginx/conf.d/$domain.d/$app.conf

View file

@ -6,7 +6,7 @@ set -eu
# Retrieve arguments # Retrieve arguments
app=$YNH_APP_INSTANCE_NAME app=$YNH_APP_INSTANCE_NAME
domain=$YNH_APP_ARG_DOMAIN domain=$YNH_APP_ARG_DOMAIN
path=$YNH_APP_ARG_PATH path="/"
port=$YNH_APP_ARG_PORT port=$YNH_APP_ARG_PORT
sync_node=$YNH_APP_ARG_SYNC_NODE sync_node=$YNH_APP_ARG_SYNC_NODE
sync_port=$YNH_APP_ARG_SYNC_PORT sync_port=$YNH_APP_ARG_SYNC_PORT
@ -23,11 +23,6 @@ source functions.sh
sudo yunohost app checkurl "${domain}${path}" -a "$app" \ sudo yunohost app checkurl "${domain}${path}" -a "$app" \
|| ynh_die "Path not available: ${domain}${path}" || ynh_die "Path not available: ${domain}${path}"
# Check path is root
if [[ $path != '/' ]]; then
ynh_die "Duniter can only be installed on root path for now"
fi
# Check port availability # Check port availability
sudo yunohost app checkport $port sudo yunohost app checkport $port
if [[ ! $? -eq 0 ]]; then if [[ ! $? -eq 0 ]]; then

View file

@ -10,7 +10,6 @@ source functions.sh
# Retrive arguments # Retrive arguments
app=$YNH_APP_INSTANCE_NAME app=$YNH_APP_INSTANCE_NAME
domain=$(ynh_app_setting_get "$app" domain) domain=$(ynh_app_setting_get "$app" domain)
path=$(ynh_app_setting_get "$app" path)
port=$(ynh_app_setting_get "$app" port) port=$(ynh_app_setting_get "$app" port)
arch=$(ynh_app_setting_get "$app" arch) arch=$(ynh_app_setting_get "$app" arch)
admin=$(ynh_app_setting_get "$app" admin) admin=$(ynh_app_setting_get "$app" admin)
@ -32,8 +31,5 @@ INSTALL_DUNITER_DEBIAN_PACKAGE
# Start duniter daemon # Start duniter daemon
sudo $app webstart sudo $app webstart
# Remove trailing "/" for next command
path=${path%/}
CONFIG_SSOWAT_FOR_RESTRICTED_ACCESS CONFIG_SSOWAT_FOR_RESTRICTED_ACCESS
CONFIG_NGINX_FOR_WEB_ADMIN CONFIG_NGINX_FOR_WEB_ADMIN