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:
parent
d10fbdc255
commit
07c73d399a
4 changed files with 1 additions and 21 deletions
|
@ -31,16 +31,6 @@
|
|||
},
|
||||
"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 l’administration web (installable uniquement à la racine)"
|
||||
},
|
||||
"example": "/",
|
||||
"default": "/"
|
||||
},
|
||||
{
|
||||
"name": "port",
|
||||
"type": "port",
|
||||
|
|
|
@ -37,7 +37,6 @@ ynh_app_setting_set "$app" unprotected_uris "/"
|
|||
CONFIG_NGINX_FOR_WEB_ADMIN () {
|
||||
# Configure Nginx
|
||||
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_DOMAIN@$domain@" $nginx_conf
|
||||
sudo cp $nginx_conf /etc/nginx/conf.d/$domain.d/$app.conf
|
||||
|
|
|
@ -6,7 +6,7 @@ set -eu
|
|||
# Retrieve arguments
|
||||
app=$YNH_APP_INSTANCE_NAME
|
||||
domain=$YNH_APP_ARG_DOMAIN
|
||||
path=$YNH_APP_ARG_PATH
|
||||
path="/"
|
||||
port=$YNH_APP_ARG_PORT
|
||||
sync_node=$YNH_APP_ARG_SYNC_NODE
|
||||
sync_port=$YNH_APP_ARG_SYNC_PORT
|
||||
|
@ -23,11 +23,6 @@ source functions.sh
|
|||
sudo yunohost app checkurl "${domain}${path}" -a "$app" \
|
||||
|| 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
|
||||
sudo yunohost app checkport $port
|
||||
if [[ ! $? -eq 0 ]]; then
|
||||
|
|
|
@ -10,7 +10,6 @@ source functions.sh
|
|||
# Retrive arguments
|
||||
app=$YNH_APP_INSTANCE_NAME
|
||||
domain=$(ynh_app_setting_get "$app" domain)
|
||||
path=$(ynh_app_setting_get "$app" path)
|
||||
port=$(ynh_app_setting_get "$app" port)
|
||||
arch=$(ynh_app_setting_get "$app" arch)
|
||||
admin=$(ynh_app_setting_get "$app" admin)
|
||||
|
@ -32,8 +31,5 @@ INSTALL_DUNITER_DEBIAN_PACKAGE
|
|||
# Start duniter daemon
|
||||
sudo $app webstart
|
||||
|
||||
# Remove trailing "/" for next command
|
||||
path=${path%/}
|
||||
|
||||
CONFIG_SSOWAT_FOR_RESTRICTED_ACCESS
|
||||
CONFIG_NGINX_FOR_WEB_ADMIN
|
||||
|
|
Loading…
Reference in a new issue