diff --git a/check_process b/check_process index 264bd8f..ed7a603 100644 --- a/check_process +++ b/check_process @@ -15,6 +15,7 @@ setup_private=1 setup_public=1 upgrade=1 + upgrade=1 from_commit=aaae7fbe83ce001fabd40509882e765a5d8da2c1 backup_restore=1 multi_instance=0 change_url=1 @@ -22,6 +23,6 @@ Email= Notification=none ;;; Upgrade options - ; commit=CommitHash - name=Name and date of the commit. + ; commit=aaae7fbe83ce001fabd40509882e765a5d8da2c1 + name=Testing (#62) manifest_arg=domain=DOMAIN&path=PATH&admin=USER&language=fr&is_public=1&password=pass&port=666& diff --git a/conf/config.json b/conf/config.json index 6c1a015..b7392e5 100644 --- a/conf/config.json +++ b/conf/config.json @@ -1,4 +1,4 @@ { - "canonicalHost: "__DOMAIN__", + "canonicalHost": "__DOMAIN__", "admin":[{"username":"__ADMIN__","password":"__PASSWORD__"}] } \ No newline at end of file diff --git a/doc/DISCLAIMER.md b/doc/DISCLAIMER.md index 70d1f2a..5d7ff75 100644 --- a/doc/DISCLAIMER.md +++ b/doc/DISCLAIMER.md @@ -39,7 +39,7 @@ You can also install Galène with an external TURN server with this branch: http ### Server Statistics page -Statistics are available under `/opt/yunohost/galene/stats.json`, with a human-readable version at `domain.ltd/stats.html`. This is only available to the server administrator. +Statistics are available under `/opt/yunohost/galene/stats.json`, with a human-readable version at `domain.ltd/stats.html`. This is only available to the server administrator (the admin/password is set in the `config.json` file: `/opt/yunohost/galene/data/config.json`). ### How do I record my lecture? diff --git a/doc/DISCLAIMER_fr.md b/doc/DISCLAIMER_fr.md index 6bb213f..bd7fff9 100644 --- a/doc/DISCLAIMER_fr.md +++ b/doc/DISCLAIMER_fr.md @@ -39,7 +39,7 @@ Vous pouvez également installer *Galène* avec un serveur TURN externe avec cet ### Statistiques du serveur -Les statistiques sont disponibles sous `/opt/yunohost/galene/stats.json`, avec une version lisible sur `domain.ltd/stats.html`. Cette page n'est disponible que pour l'administrateur du serveur. +Les statistiques sont disponibles sous `/opt/yunohost/galene/stats.json`, avec une version lisible sur `domain.ltd/stats.html`. Cette page n'est disponible que pour l'administrateur du serveur (le mot de passe et l'administrateur sont définis dans le fichier `config.json` : `/opt/yunohost/galene/data/config.json`). ### Comment enregistrer ma conférence ? diff --git a/manifest.json b/manifest.json index 8111ae2..6f2fa91 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Videoconferencing server that is easy to deploy", "fr": "Serveur de visioconférence facile à déployer" }, - "version": "0.4.0~ynh3", + "version": "0.4.1~ynh1", "url": "https://galene.org/", "upstream": { "license": "MIT", diff --git a/scripts/install b/scripts/install index 07942af..c9c984c 100755 --- a/scripts/install +++ b/scripts/install @@ -50,6 +50,7 @@ ynh_script_progression --message="Storing installation settings..." --weight=4 ynh_app_setting_set --app=$app --key=domain --value=$domain ynh_app_setting_set --app=$app --key=path --value=$path_url ynh_app_setting_set --app=$app --key=admin --value=$admin +ynh_app_setting_set --app=$app --key=password --value=$password ynh_app_setting_set --app=$app --key=group_name --value="$group_name" ynh_app_setting_set --app=$app --key=group_description --value="$group_description" @@ -103,9 +104,11 @@ chown -R $app:www-data "$final_path" # Create data folder mkdir -p "$final_path/data" -echo $admin:$password > "$final_path/data/passwd" -chmod 400 "$final_path/data/passwd" -chown $app: "$final_path/data/passwd" + +ynh_add_config --template="../config.json" --destination="$final_path/data/config.json" + +chmod 400 "$final_path/data/config.json" +chown $app:$app "$final_path/data/config.json" #================================================= # NGINX CONFIGURATION diff --git a/scripts/upgrade b/scripts/upgrade index d3a65e1..e402467 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -19,6 +19,7 @@ app=$YNH_APP_INSTANCE_NAME domain=$(ynh_app_setting_get --app=$app --key=domain) path_url=$(ynh_app_setting_get --app=$app --key=path) admin=$(ynh_app_setting_get --app=$app --key=admin) +password=$(ynh_app_setting_get --app=$app --key=password) final_path=$(ynh_app_setting_get --app=$app --key=final_path) group_name=$(ynh_app_setting_get --app=$app --key=group_name) port=$(ynh_app_setting_get --app=$app --key=port) @@ -99,13 +100,25 @@ if [ "$upgrade_type" == "UPGRADE_APP" ] then ynh_script_progression --message="Upgrading source files..." --weight=2 - ynh_setup_source --dest_dir="$final_path" --source_id="$architecture" --keep="$final_path/data/passwd" + ynh_setup_source --dest_dir="$final_path" --source_id="$architecture" #--keep="$final_path/data/config.json" fi chmod 750 "$final_path" chmod -R o-rwx "$final_path" chown -R $app:www-data "$final_path" +#================================================= +# CREATE DATA FOLDER +#================================================= + +# Create data folder +mkdir -p "$final_path/data" + +ynh_add_config --template="../config.json" --destination="$final_path/data/config.json" + +chmod 400 "$final_path/data/config.json" +chown $app:$app "$final_path/data/config.json" + #================================================= # NGINX CONFIGURATION #=================================================