mirror of
https://github.com/YunoHost-Apps/keeweb_ynh.git
synced 2024-09-03 19:26:33 +02:00
commit
1f04a06ce7
11 changed files with 111 additions and 99 deletions
18
README.md
18
README.md
|
@ -1,7 +1,7 @@
|
||||||
# Keeweb for YunoHost
|
# Keeweb for YunoHost
|
||||||
|
|
||||||
[](https://dash.yunohost.org/appci/app/keeweb)
|
[](https://dash.yunohost.org/appci/app/keeweb)  
|
||||||
[](https://install-app.yunohost.org/?app=keeweb)
|
[](https://install-app.yunohost.org/?app=keeweb)
|
||||||
|
|
||||||
*[Lire ce readme en français.](./README_fr.md)*
|
*[Lire ce readme en français.](./README_fr.md)*
|
||||||
|
|
||||||
|
@ -9,7 +9,7 @@
|
||||||
If you don't have YunoHost, please see [here](https://yunohost.org/#/install) to know how to install and enjoy it.*
|
If you don't have YunoHost, please see [here](https://yunohost.org/#/install) to know how to install and enjoy it.*
|
||||||
|
|
||||||
## Overview
|
## Overview
|
||||||
Web client for reading and editing Keepass files locally. It can also sync with WebDAV (Owncloud, Nextcloud...), Dropbox, Google Drive, OneDrive...
|
Web client for reading and editing Keepass files locally. It can also sync with WebDAV (Nextcloud, Dropbox, Google Drive, OneDrive...)
|
||||||
|
|
||||||
**Shipped version:** 1.7.7
|
**Shipped version:** 1.7.7
|
||||||
|
|
||||||
|
@ -38,14 +38,13 @@ No users support.
|
||||||
|
|
||||||
#### Supported architectures
|
#### Supported architectures
|
||||||
|
|
||||||
* x86-64b - [](https://ci-apps.yunohost.org/ci/apps/keeweb/)
|
* x86-64 - [](https://ci-apps.yunohost.org/ci/apps/keeweb/)
|
||||||
* ARMv8-A - [](https://ci-apps-arm.yunohost.org/ci/apps/keeweb/)
|
* ARMv8-A - [](https://ci-apps-arm.yunohost.org/ci/apps/keeweb/)
|
||||||
* Jessie x86-64b - [](https://ci-stretch.nohost.me/ci/apps/keeweb/)
|
|
||||||
|
|
||||||
## Additionnal informations
|
## Additionnal informations
|
||||||
|
|
||||||
### Usage with OwnCloud/NextCloud
|
### Usage with Nextcloud
|
||||||
1. Open your file through webdav using https://linktoowncloud/remote.php/webdav/PATH-TO-YOUR-KDBX-FILE and your username and password (no need to enter username and password if you are using a private Keeweb, as it will automatically detect that you are logged in OwnCloud/NextCloud
|
1. Open your file through webdav using https://linktoowncloud/remote.php/webdav/PATH-TO-YOUR-KDBX-FILE and your username and password (no need to enter username and password if you are using a private Keeweb, as it will automatically detect that you are logged in NextCloud)
|
||||||
|
|
||||||
### Usage for Dropbox sync
|
### Usage for Dropbox sync
|
||||||
1. [create](https://www.dropbox.com/developers/apps/create) a Dropbox app
|
1. [create](https://www.dropbox.com/developers/apps/create) a Dropbox app
|
||||||
|
@ -64,8 +63,7 @@ No users support.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
Developers infos
|
## Developers infos
|
||||||
----------------
|
|
||||||
|
|
||||||
Please do your pull request to the [testing branch](https://github.com/YunoHost-Apps/keeweb_ynh/tree/testing).
|
Please do your pull request to the [testing branch](https://github.com/YunoHost-Apps/keeweb_ynh/tree/testing).
|
||||||
|
|
||||||
|
|
18
README_fr.md
18
README_fr.md
|
@ -1,7 +1,7 @@
|
||||||
# Keeweb pour YunoHost
|
# Keeweb pour YunoHost
|
||||||
|
|
||||||
[](https://dash.yunohost.org/appci/app/keeweb)
|
[](https://dash.yunohost.org/appci/app/keeweb)  
|
||||||
[](https://install-app.yunohost.org/?app=keeweb)
|
[](https://install-app.yunohost.org/?app=keeweb)
|
||||||
|
|
||||||
*[Read this readme in english.](./README.md)*
|
*[Read this readme in english.](./README.md)*
|
||||||
|
|
||||||
|
@ -9,7 +9,7 @@
|
||||||
Si vous n'avez pas YunoHost, merci de regarder [ici](https://yunohost.org/#/install_fr) pour savoir comment l'installer et en profiter.*
|
Si vous n'avez pas YunoHost, merci de regarder [ici](https://yunohost.org/#/install_fr) pour savoir comment l'installer et en profiter.*
|
||||||
|
|
||||||
## Résumé
|
## Résumé
|
||||||
Client Web pour la lecture et l'édition de fichiers Keepass en local. Il peut également synchroniser avec WebDAV (Owncloud, Nextcloud...), Dropbox, Google Drive, OneDrive....
|
Client Web pour la lecture et l'édition de fichiers Keepass en local. Il peut également synchroniser avec WebDAV (Nextcloud, Dropbox, Google Drive, OneDrive...)
|
||||||
|
|
||||||
**Version embarquée :** 1.7.7
|
**Version embarquée :** 1.7.7
|
||||||
|
|
||||||
|
@ -38,14 +38,13 @@ Pas de support utilisateurs
|
||||||
|
|
||||||
#### Architectures supportées.
|
#### Architectures supportées.
|
||||||
|
|
||||||
* x86-64b - [](https://ci-apps.yunohost.org/ci/apps/keeweb/)
|
* x86-64 - [](https://ci-apps.yunohost.org/ci/apps/keeweb/)
|
||||||
* ARMv8-A - [](https://ci-apps-arm.yunohost.org/ci/apps/keeweb/)
|
* ARMv8-A - [](https://ci-apps-arm.yunohost.org/ci/apps/keeweb/)
|
||||||
* Jessie x86-64b - [](https://ci-stretch.nohost.me/ci/apps/keeweb/)
|
|
||||||
|
|
||||||
## Informations additionnelles
|
## Informations additionnelles
|
||||||
|
|
||||||
### Usage avec OwnCloud/NextCloud
|
### Usage avec Nextcloud
|
||||||
1. Ouvrez votre fichier via webdav en utilisant https://linktoowncloud/remote.php/webdav/PATH-TO-YOUR-KDBX-FILE et votre nom d'utilisateur et votre mot de passe (pas besoin d'entrer votre nom d'utilisateur et votre mot de passe si vous utilisez un Keeweb privé, car il détectera automatiquement que vous êtes connecté dans OwnCloud/NextCloud
|
1. Ouvrez votre fichier via webdav en utilisant https://linktoowncloud/remote.php/webdav/PATH-TO-YOUR-KDBX-FILE et votre nom d'utilisateur et votre mot de passe (pas besoin d'entrer votre nom d'utilisateur et votre mot de passe si vous utilisez un Keeweb privé, car il détectera automatiquement que vous êtes connecté dans Nextcloud)
|
||||||
|
|
||||||
### Usage pour Dropbox sync
|
### Usage pour Dropbox sync
|
||||||
1. [Créer](https://www.dropbox.com/developers/apps/create) une app Dropbox
|
1. [Créer](https://www.dropbox.com/developers/apps/create) une app Dropbox
|
||||||
|
@ -64,8 +63,7 @@ Pas de support utilisateurs
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
Informations à l'intention des développeurs
|
## Informations à l'intention des développeurs
|
||||||
----------------
|
|
||||||
|
|
||||||
Merci de faire vos pull request sur la [branche testing](https://github.com/YunoHost-Apps/keeweb_ynh/tree/testing).
|
Merci de faire vos pull request sur la [branche testing](https://github.com/YunoHost-Apps/keeweb_ynh/tree/testing).
|
||||||
|
|
||||||
|
|
|
@ -11,16 +11,14 @@
|
||||||
setup_private=1
|
setup_private=1
|
||||||
setup_public=1
|
setup_public=1
|
||||||
upgrade=1
|
upgrade=1
|
||||||
upgrade=1 from_commit=9e5c65c461a22d9b85be732e072ff938911106ad
|
upgrade=1 from_commit=6ec03114172c5de3291059756a38d57c63ffb4f2
|
||||||
backup_restore=1
|
backup_restore=1
|
||||||
multi_instance=1
|
multi_instance=1
|
||||||
incorrect_path=1
|
|
||||||
port_already_use=0
|
|
||||||
change_url=1
|
change_url=1
|
||||||
;;; Options
|
;;; Options
|
||||||
Email=maniackc_dev@crudelis.fr
|
Email=
|
||||||
Notification=down
|
Notification=down
|
||||||
;;; Upgrade options
|
;;; Upgrade options
|
||||||
; commit=9e5c65c461a22d9b85be732e072ff938911106ad
|
; commit=6ec03114172c5de3291059756a38d57c63ffb4f2
|
||||||
name=6 Dec 2016 9e5c65c461a22d9b85be732e072ff938911106ad
|
name=Merge pull request #17 from YunoHost-Apps/testing
|
||||||
manifest_arg=domain=DOMAIN&path=PATH&is_public=1
|
manifest_arg=domain=DOMAIN&path=PATH&is_public=1
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
"en": "Password manager compatible with KeePass.",
|
"en": "Password manager compatible with KeePass.",
|
||||||
"fr": "Gestionnaire de mots de passe compatible avec KeePass."
|
"fr": "Gestionnaire de mots de passe compatible avec KeePass."
|
||||||
},
|
},
|
||||||
"version": "1.7.7~ynh3",
|
"version": "1.7.7~ynh4",
|
||||||
"url": "https://keeweb.info/",
|
"url": "https://keeweb.info/",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"maintainer": {
|
"maintainer": {
|
||||||
|
@ -14,7 +14,7 @@
|
||||||
"email": "pierre@kayou.io"
|
"email": "pierre@kayou.io"
|
||||||
},
|
},
|
||||||
"requirements": {
|
"requirements": {
|
||||||
"yunohost": ">= 3.8.0"
|
"yunohost": ">= 4.1.7"
|
||||||
},
|
},
|
||||||
"multi_instance": true,
|
"multi_instance": true,
|
||||||
"services": [
|
"services": [
|
||||||
|
@ -25,29 +25,17 @@
|
||||||
{
|
{
|
||||||
"name": "domain",
|
"name": "domain",
|
||||||
"type": "domain",
|
"type": "domain",
|
||||||
"ask": {
|
|
||||||
"en": "Choose a domain name for Keeweb",
|
|
||||||
"fr": "Choisissez un nom de domaine pour Keeweb"
|
|
||||||
},
|
|
||||||
"example": "example.com"
|
"example": "example.com"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "path",
|
"name": "path",
|
||||||
"type": "path",
|
"type": "path",
|
||||||
"ask": {
|
|
||||||
"en": "Choose a path for Keeweb",
|
|
||||||
"fr": "Choisissez un chemin pour Keeweb"
|
|
||||||
},
|
|
||||||
"example": "/keeweb",
|
"example": "/keeweb",
|
||||||
"default": "/keeweb"
|
"default": "/keeweb"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "is_public",
|
"name": "is_public",
|
||||||
"type": "boolean",
|
"type": "boolean",
|
||||||
"ask": {
|
|
||||||
"en": "Is it a public application?",
|
|
||||||
"fr": "Est-ce une application publique ?"
|
|
||||||
},
|
|
||||||
"default": false
|
"default": false
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
|
@ -12,7 +12,7 @@ ynh_multimedia_build_main_dir () {
|
||||||
local checksum="4852c8607db820ad51f348da0dcf0c88"
|
local checksum="4852c8607db820ad51f348da0dcf0c88"
|
||||||
|
|
||||||
# Download yunohost.multimedia scripts
|
# Download yunohost.multimedia scripts
|
||||||
wget -nv https://github.com/YunoHost-Apps/yunohost.multimedia/archive/${ynh_media_release}.tar.gz
|
wget -nv https://github.com/YunoHost-Apps/yunohost.multimedia/archive/${ynh_media_release}.tar.gz 2>&1
|
||||||
|
|
||||||
# Check the control sum
|
# Check the control sum
|
||||||
echo "${checksum} ${ynh_media_release}.tar.gz" | md5sum -c --status \
|
echo "${checksum} ${ynh_media_release}.tar.gz" | md5sum -c --status \
|
||||||
|
|
|
@ -19,6 +19,7 @@ ynh_abort_if_errors
|
||||||
#=================================================
|
#=================================================
|
||||||
# LOAD SETTINGS
|
# LOAD SETTINGS
|
||||||
#=================================================
|
#=================================================
|
||||||
|
ynh_print_info --message="Loading installation settings..."
|
||||||
|
|
||||||
app=$YNH_APP_INSTANCE_NAME
|
app=$YNH_APP_INSTANCE_NAME
|
||||||
|
|
||||||
|
@ -26,15 +27,24 @@ final_path=$(ynh_app_setting_get $app final_path)
|
||||||
domain=$(ynh_app_setting_get $app domain)
|
domain=$(ynh_app_setting_get $app domain)
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# STANDARD BACKUP STEPS
|
# DECLARE DATA AND CONF FILES TO BACKUP
|
||||||
|
#=================================================
|
||||||
|
ynh_print_info --message="Declaring files to be backed up..."
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# BACKUP OF THE MAIN DIR OF THE APP
|
# BACKUP OF THE MAIN DIR OF THE APP
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
ynh_backup "$final_path"
|
ynh_backup --src_path="$final_path"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# BACKUP OF THE NGINX CONFIGURATION
|
# BACKUP OF THE NGINX CONFIGURATION
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
ynh_backup "/etc/nginx/conf.d/$domain.d/$app.conf"
|
ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf"
|
||||||
|
|
||||||
|
#=================================================
|
||||||
|
# END OF SCRIPT
|
||||||
|
#=================================================
|
||||||
|
|
||||||
|
ynh_print_info --message="Backup script completed for $app. (YunoHost will then actually copy those files to the archive)."
|
||||||
|
|
|
@ -108,8 +108,9 @@ fi
|
||||||
#=================================================
|
#=================================================
|
||||||
# RELOAD NGINX
|
# RELOAD NGINX
|
||||||
#=================================================
|
#=================================================
|
||||||
|
ynh_script_progression --message="Reloading NGINX web server..."
|
||||||
|
|
||||||
ynh_system_reload --service_name=nginx
|
ynh_systemd_action --service_name=nginx --action=reload
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# DEACTIVE MAINTENANCE MODE
|
# DEACTIVE MAINTENANCE MODE
|
||||||
|
@ -118,3 +119,9 @@ ynh_system_reload --service_name=nginx
|
||||||
path_url=$old_path
|
path_url=$old_path
|
||||||
domain=$old_domain
|
domain=$old_domain
|
||||||
ynh_maintenance_mode_OFF
|
ynh_maintenance_mode_OFF
|
||||||
|
|
||||||
|
#=================================================
|
||||||
|
# END OF SCRIPT
|
||||||
|
#=================================================
|
||||||
|
|
||||||
|
ynh_script_progression --message="Change of URL completed for $app" --last
|
||||||
|
|
|
@ -14,11 +14,11 @@ source /usr/share/yunohost/helpers
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
ynh_clean_setup () {
|
ynh_clean_setup () {
|
||||||
# Nettoyage des résidus d'installation non pris en charge par le script remove.
|
### Remove this function if there's nothing to clean before calling the remove script.
|
||||||
# Pas de nettoyage supplémentaire nécessaire ici...
|
true
|
||||||
echo ""
|
|
||||||
}
|
}
|
||||||
ynh_abort_if_errors # Active trap pour arrêter le script si une erreur est détectée.
|
# Exit if an error occurs during the execution of the script
|
||||||
|
ynh_abort_if_errors
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# RETRIEVE ARGUMENTS FROM THE MANIFEST
|
# RETRIEVE ARGUMENTS FROM THE MANIFEST
|
||||||
|
@ -33,26 +33,22 @@ app=$YNH_APP_INSTANCE_NAME
|
||||||
#=================================================
|
#=================================================
|
||||||
# CHECK IF THE APP CAN BE INSTALLED WITH THESE ARGS
|
# CHECK IF THE APP CAN BE INSTALLED WITH THESE ARGS
|
||||||
#=================================================
|
#=================================================
|
||||||
|
ynh_script_progression --message="Validating installation parameters..."
|
||||||
|
|
||||||
final_path=/var/www/$app
|
final_path=/var/www/$app
|
||||||
test ! -e "$final_path" || ynh_die "This path already contains a folder"
|
test ! -e "$final_path" || ynh_die --message="This path already contains a folder"
|
||||||
|
|
||||||
# Normalize the url path syntax
|
|
||||||
path_url=$(ynh_normalize_url_path $path_url)
|
|
||||||
|
|
||||||
# Check web path availability
|
|
||||||
ynh_webpath_available $domain $path_url
|
|
||||||
# Register (book) web path
|
# Register (book) web path
|
||||||
ynh_webpath_register $app $domain $path_url
|
ynh_webpath_register --app=$app --domain=$domain --path_url=$path_url
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# STORE SETTINGS FROM MANIFEST
|
# STORE SETTINGS FROM MANIFEST
|
||||||
#=================================================
|
#=================================================
|
||||||
|
ynh_script_progression --message="Storing installation settings..."
|
||||||
|
|
||||||
ynh_app_setting_set $app domain $domain
|
ynh_app_setting_set --app=$app --key=domain --value=$domain
|
||||||
ynh_app_setting_set $app path $path_url
|
ynh_app_setting_set --app=$app --key=path --value=$path_url
|
||||||
ynh_app_setting_set $app is_public $is_public
|
ynh_app_setting_set --app=$app --key=final_path --value=$final_path
|
||||||
ynh_app_setting_set $app final_path $final_path
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# STANDARD MODIFICATIONS
|
# STANDARD MODIFICATIONS
|
||||||
|
@ -68,6 +64,7 @@ cp -r ../sources/extra_files/app/* "$final_path"
|
||||||
#=================================================
|
#=================================================
|
||||||
# NGINX CONFIGURATION
|
# NGINX CONFIGURATION
|
||||||
#=================================================
|
#=================================================
|
||||||
|
ynh_script_progression --message="Configuring NGINX web server..."
|
||||||
|
|
||||||
ynh_add_nginx_config
|
ynh_add_nginx_config
|
||||||
|
|
||||||
|
@ -83,7 +80,7 @@ ynh_replace_string "(no-config)" "config.json" "$final_path/index.html"
|
||||||
# COPY THE CONFIG FILE
|
# COPY THE CONFIG FILE
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
cp ../conf/config.json "$final_path/"
|
cp ../conf/config.json "$final_path/config.json"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# STORE THE CHECKSUM OF THE CONFIG FILE
|
# STORE THE CHECKSUM OF THE CONFIG FILE
|
||||||
|
@ -104,18 +101,20 @@ chown -R root: $final_path
|
||||||
#=================================================
|
#=================================================
|
||||||
# SETUP SSOWAT
|
# SETUP SSOWAT
|
||||||
#=================================================
|
#=================================================
|
||||||
|
ynh_script_progression --message="Configuring permissions..."
|
||||||
|
|
||||||
# Make app public if necessary
|
# Make app public if necessary
|
||||||
if [ $is_public -eq 1 ]
|
if [ $is_public -eq 1 ]
|
||||||
then
|
then
|
||||||
ynh_app_setting_set $app skipped_uris "/"
|
ynh_permission_update --permission="main" --add="visitors"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# RELOAD NGINX
|
# RELOAD NGINX
|
||||||
#=================================================
|
#=================================================
|
||||||
|
ynh_script_progression --message="Reloading NGINX web server..."
|
||||||
|
|
||||||
ynh_system_reload --service_name=nginx
|
ynh_systemd_action --service_name=nginx --action=reload
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# SEND A README FOR THE ADMIN
|
# SEND A README FOR THE ADMIN
|
||||||
|
@ -124,3 +123,9 @@ ynh_system_reload --service_name=nginx
|
||||||
message="If you facing an issue or want to improve this app, please open a new issue in this project: https://github.com/YunoHost-Apps/keeweb_ynh"
|
message="If you facing an issue or want to improve this app, please open a new issue in this project: https://github.com/YunoHost-Apps/keeweb_ynh"
|
||||||
|
|
||||||
ynh_send_readme_to_admin --app_message="$message" --recipients="root"
|
ynh_send_readme_to_admin --app_message="$message" --recipients="root"
|
||||||
|
|
||||||
|
#=================================================
|
||||||
|
# END OF SCRIPT
|
||||||
|
#=================================================
|
||||||
|
|
||||||
|
ynh_script_progression --message="Installation of $app completed" --last
|
||||||
|
|
|
@ -12,6 +12,7 @@ source /usr/share/yunohost/helpers
|
||||||
#=================================================
|
#=================================================
|
||||||
# LOAD SETTINGS
|
# LOAD SETTINGS
|
||||||
#=================================================
|
#=================================================
|
||||||
|
ynh_script_progression --message="Loading installation settings..."
|
||||||
|
|
||||||
app=$YNH_APP_INSTANCE_NAME
|
app=$YNH_APP_INSTANCE_NAME
|
||||||
|
|
||||||
|
@ -21,13 +22,24 @@ final_path=$(ynh_app_setting_get $app final_path)
|
||||||
#=================================================
|
#=================================================
|
||||||
# STANDARD REMOVE
|
# STANDARD REMOVE
|
||||||
#=================================================
|
#=================================================
|
||||||
# REMOVE THE MAIN DIR OF THE APP
|
# REMOVE APP MAIN DIR
|
||||||
#=================================================
|
#=================================================
|
||||||
|
ynh_script_progression --message="Removing app main directory..."
|
||||||
|
|
||||||
ynh_secure_remove "$final_path"
|
# Remove the app directory securely
|
||||||
|
ynh_secure_remove --file="$final_path"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# REMOVE THE NGINX CONFIGURATION
|
# REMOVE NGINX CONFIGURATION
|
||||||
#=================================================
|
#=================================================
|
||||||
|
ynh_script_progression --message="Removing NGINX web server configuration..."
|
||||||
|
|
||||||
|
# Remove the dedicated NGINX config
|
||||||
ynh_remove_nginx_config
|
ynh_remove_nginx_config
|
||||||
|
|
||||||
|
#=================================================
|
||||||
|
# END OF SCRIPT
|
||||||
|
#=================================================
|
||||||
|
|
||||||
|
ynh_script_progression --message="Removal of $app completed" --last
|
||||||
|
|
||||||
|
|
|
@ -47,13 +47,13 @@ ynh_maintenance_mode_ON
|
||||||
# RESTORE OF THE NGINX CONFIGURATION
|
# RESTORE OF THE NGINX CONFIGURATION
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
ynh_restore_file "/etc/nginx/conf.d/$domain.d/$app.conf"
|
ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# RESTORE OF THE MAIN DIR OF THE APP
|
# RESTORE OF THE MAIN DIR OF THE APP
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
ynh_restore_file "$final_path"
|
ynh_restore_file --origin_path="$final_path"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# RESTORE USER RIGHTS
|
# RESTORE USER RIGHTS
|
||||||
|
@ -67,8 +67,9 @@ chown -R root: $final_path
|
||||||
#=================================================
|
#=================================================
|
||||||
# RELOAD NGINX
|
# RELOAD NGINX
|
||||||
#=================================================
|
#=================================================
|
||||||
|
ynh_script_progression --message="Reloading NGINX web server and PHP-FPM..."
|
||||||
|
|
||||||
ynh_system_reload --service_name=nginx
|
ynh_systemd_action --service_name=nginx --action=reload
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# DEACTIVE MAINTENANCE MODE
|
# DEACTIVE MAINTENANCE MODE
|
||||||
|
@ -83,3 +84,9 @@ ynh_maintenance_mode_OFF
|
||||||
message="If you facing an issue or want to improve this app, please open a new issue in this project: https://github.com/YunoHost-Apps/keeweb_ynh"
|
message="If you facing an issue or want to improve this app, please open a new issue in this project: https://github.com/YunoHost-Apps/keeweb_ynh"
|
||||||
|
|
||||||
ynh_send_readme_to_admin --app_message="$message" --recipients="root"
|
ynh_send_readme_to_admin --app_message="$message" --recipients="root"
|
||||||
|
|
||||||
|
#=================================================
|
||||||
|
# END OF SCRIPT
|
||||||
|
#=================================================
|
||||||
|
|
||||||
|
ynh_script_progression --message="Restoration completed for $app" --last
|
||||||
|
|
|
@ -17,7 +17,6 @@ app=$YNH_APP_INSTANCE_NAME
|
||||||
|
|
||||||
domain=$(ynh_app_setting_get $app domain)
|
domain=$(ynh_app_setting_get $app domain)
|
||||||
path_url=$(ynh_app_setting_get $app path)
|
path_url=$(ynh_app_setting_get $app path)
|
||||||
is_public=$(ynh_app_setting_get $app is_public)
|
|
||||||
final_path=$(ynh_app_setting_get $app final_path)
|
final_path=$(ynh_app_setting_get $app final_path)
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -30,19 +29,18 @@ upgrade_type=$(ynh_check_app_version_changed)
|
||||||
# ENSURE DOWNWARD COMPATIBILITY
|
# ENSURE DOWNWARD COMPATIBILITY
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
if [ "$is_public" = "Yes" ]; then
|
|
||||||
ynh_app_setting_set $app is_public 1 # Fixe is_public en booléen
|
|
||||||
is_public=1
|
|
||||||
elif [ "$is_public" = "No" ]; then
|
|
||||||
ynh_app_setting_set $app is_public 0
|
|
||||||
is_public=0
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -z "$final_path" ]; then
|
if [ -z "$final_path" ]; then
|
||||||
final_path=/var/www/$app
|
final_path=/var/www/$app
|
||||||
ynh_app_setting_set $app final_path $final_path
|
ynh_app_setting_set $app final_path $final_path
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Cleaning legacy permissions
|
||||||
|
if ynh_legacy_permissions_exists; then
|
||||||
|
ynh_legacy_permissions_delete_all
|
||||||
|
|
||||||
|
ynh_app_setting_delete --app=$app --key=is_public
|
||||||
|
fi
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP
|
# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -56,12 +54,6 @@ ynh_clean_setup () {
|
||||||
# Exit if an error occurs during the execution of the script
|
# Exit if an error occurs during the execution of the script
|
||||||
ynh_abort_if_errors
|
ynh_abort_if_errors
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# CHECK THE PATH
|
|
||||||
#=================================================
|
|
||||||
|
|
||||||
path_url=$(ynh_normalize_url_path $path_url) # Vérifie et corrige la syntaxe du path.
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# ACTIVATE MAINTENANCE MODE
|
# ACTIVATE MAINTENANCE MODE
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -97,7 +89,7 @@ ynh_replace_string "(no-config)" "config.json" "$final_path/index.html"
|
||||||
|
|
||||||
# Copie ou modification d'un fichier de config
|
# Copie ou modification d'un fichier de config
|
||||||
ynh_backup_if_checksum_is_different "$final_path/config.json" # Créé un backup du fichier de config si il a été modifié.
|
ynh_backup_if_checksum_is_different "$final_path/config.json" # Créé un backup du fichier de config si il a été modifié.
|
||||||
cp ../conf/config.json "$final_path/"
|
cp ../conf/config.json "$final_path/config.json"
|
||||||
ynh_store_file_checksum "$final_path/config.json" # Réenregistre la somme de contrôle du fichier de config
|
ynh_store_file_checksum "$final_path/config.json" # Réenregistre la somme de contrôle du fichier de config
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -109,24 +101,21 @@ ynh_store_file_checksum "$final_path/config.json" # Réenregistre la somme de co
|
||||||
# Les fichiers appartiennent à root
|
# Les fichiers appartiennent à root
|
||||||
chown -R root: $final_path
|
chown -R root: $final_path
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# SETUP SSOWAT
|
|
||||||
#=================================================
|
|
||||||
|
|
||||||
# Make app public if necessary
|
|
||||||
if [ $is_public -eq 1 ]
|
|
||||||
then
|
|
||||||
ynh_app_setting_set $app skipped_uris "/"
|
|
||||||
fi
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# RELOAD NGINX
|
# RELOAD NGINX
|
||||||
#=================================================
|
#=================================================
|
||||||
|
ynh_script_progression --message="Reloading NGINX web server..."
|
||||||
|
|
||||||
ynh_system_reload --service_name=nginx
|
ynh_systemd_action --service_name=nginx --action=reload
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# DEACTIVE MAINTENANCE MODE
|
# DEACTIVE MAINTENANCE MODE
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
ynh_maintenance_mode_OFF
|
ynh_maintenance_mode_OFF
|
||||||
|
|
||||||
|
#=================================================
|
||||||
|
# END OF SCRIPT
|
||||||
|
#=================================================
|
||||||
|
|
||||||
|
ynh_script_progression --message="Upgrade of $app completed" --last
|
||||||
|
|
Loading…
Add table
Reference in a new issue