mirror of
https://github.com/YunoHost-Apps/z-push_ynh.git
synced 2024-09-03 18:05:58 +02:00
Merge pull request #77 from YunoHost-Apps/upgrade
upgrade to 2.6.4~ynh1
This commit is contained in:
commit
802e42f9e2
21 changed files with 196 additions and 122 deletions
|
@ -1,7 +0,0 @@
|
||||||
language: python
|
|
||||||
|
|
||||||
before_install:
|
|
||||||
- git clone https://github.com/YunoHost/package_linter /tmp/package_linter
|
|
||||||
|
|
||||||
script:
|
|
||||||
- /tmp/package_linter/package_linter.py ./
|
|
33
README.md
33
README.md
|
@ -1,33 +1,38 @@
|
||||||
|
<!--
|
||||||
|
N.B.: This README was automatically generated by https://github.com/YunoHost/apps/tree/master/tools/README-generator
|
||||||
|
It shall NOT be edited by hand.
|
||||||
|
-->
|
||||||
|
|
||||||
# Z-Push for YunoHost
|
# Z-Push for YunoHost
|
||||||
|
|
||||||
[](https://dash.yunohost.org/appci/app/z-push)  
|
[](https://dash.yunohost.org/appci/app/z-push)  
|
||||||
[](https://install-app.yunohost.org/?app=z-push)
|
[](https://install-app.yunohost.org/?app=z-push)
|
||||||
|
|
||||||
> *This package allows you to install Z-Push quickly and simply on a YunoHost server.
|
*[Lire ce readme en français.](./README_fr.md)*
|
||||||
|
|
||||||
|
> *This package allows you to install Z-Push quickly and simply on a YunoHost server.
|
||||||
If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/install) to learn how to install it.*
|
If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/install) to learn how to install it.*
|
||||||
|
|
||||||
## Overview
|
## Overview
|
||||||
|
|
||||||
Z-Push is an Exchange ActiveSync fronted written in PHP which lets you synchronize emails (IMAP/SMTP backend) and calendar/contacts (cardDAV and caldDAV backend)
|
Z-Push is an Exchange ActiveSync fronted written in PHP which lets you synchronize emails (IMAP/SMTP backend) and calendar/contacts (cardDAV and caldDAV backend)
|
||||||
|
|
||||||
**Shipped version:** 2.6.1
|
|
||||||
|
|
||||||
## Documentation
|
**Shipped version:** 2.6.4~ynh1
|
||||||
|
|
||||||
* Official documentation: https://wiki.z-hub.io/display/ZP/Documentation
|
|
||||||
|
|
||||||
#### Supported architectures
|
|
||||||
|
|
||||||
* x86-64 - [](https://ci-apps.yunohost.org/ci/apps/z-push/)
|
## Disclaimers / important information
|
||||||
* ARMv8-A - [](https://ci-apps-arm.yunohost.org/ci/apps/z-push/)
|
|
||||||
|
|
||||||
## Links
|
* would be better to create a dedicated domain: autodiscover.yourdomain.org
|
||||||
|
|
||||||
* Report a bug: https://github.com/YunoHost-Apps/z-push_ynh/issues
|
## Documentation and resources
|
||||||
* App website: http://z-push.org/
|
|
||||||
* Upstream app repository: https://github.com/Z-Hub/Z-Push
|
|
||||||
* YunoHost website: https://yunohost.org/
|
|
||||||
|
|
||||||
---
|
* Official app website: http://z-push.org
|
||||||
|
* Official admin documentation: https://wiki.z-hub.io/display/ZP/Documentation
|
||||||
|
* Upstream app code repository: https://github.com/Z-Hub/Z-Push
|
||||||
|
* YunoHost documentation for this app: https://yunohost.org/app_z-push
|
||||||
|
* Report a bug: https://github.com/YunoHost-Apps/z-push_ynh/issues
|
||||||
|
|
||||||
## Developer info
|
## Developer info
|
||||||
|
|
||||||
|
@ -39,3 +44,5 @@ sudo yunohost app install https://github.com/YunoHost-Apps/z-push_ynh/tree/testi
|
||||||
or
|
or
|
||||||
sudo yunohost app upgrade z-push -u https://github.com/YunoHost-Apps/z-push_ynh/tree/testing --debug
|
sudo yunohost app upgrade z-push -u https://github.com/YunoHost-Apps/z-push_ynh/tree/testing --debug
|
||||||
```
|
```
|
||||||
|
|
||||||
|
**More info regarding app packaging:** https://yunohost.org/packaging_apps
|
44
README_fr.md
Normal file
44
README_fr.md
Normal file
|
@ -0,0 +1,44 @@
|
||||||
|
# Z-Push pour YunoHost
|
||||||
|
|
||||||
|
[](https://dash.yunohost.org/appci/app/z-push)  
|
||||||
|
[](https://install-app.yunohost.org/?app=z-push)
|
||||||
|
|
||||||
|
*[Read this readme in english.](./README.md)*
|
||||||
|
*[Lire ce readme en français.](./README_fr.md)*
|
||||||
|
|
||||||
|
> *Ce package vous permet d'installer Z-Push rapidement et simplement sur un serveur YunoHost.
|
||||||
|
Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour savoir comment l'installer et en profiter.*
|
||||||
|
|
||||||
|
## Vue d'ensemble
|
||||||
|
|
||||||
|
Z-Push is an Exchange ActiveSync fronted written in PHP which lets you synchronize emails (IMAP/SMTP backend) and calendar/contacts (cardDAV and caldDAV backend)
|
||||||
|
|
||||||
|
|
||||||
|
**Version incluse :** 2.6.4~ynh1
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## Avertissements / informations importantes
|
||||||
|
|
||||||
|
* would be better to create a dedicated domain: autodiscover.yourdomain.org
|
||||||
|
|
||||||
|
## Documentations et ressources
|
||||||
|
|
||||||
|
* Site officiel de l'app : http://z-push.org
|
||||||
|
* Documentation officielle de l'admin : https://wiki.z-hub.io/display/ZP/Documentation
|
||||||
|
* Dépôt de code officiel de l'app : https://github.com/Z-Hub/Z-Push
|
||||||
|
* Documentation YunoHost pour cette app : https://yunohost.org/app_z-push
|
||||||
|
* Signaler un bug : https://github.com/YunoHost-Apps/z-push_ynh/issues
|
||||||
|
|
||||||
|
## Informations pour les développeurs
|
||||||
|
|
||||||
|
Merci de faire vos pull request sur la [branche testing](https://github.com/YunoHost-Apps/z-push_ynh/tree/testing).
|
||||||
|
|
||||||
|
Pour essayer la branche testing, procédez comme suit.
|
||||||
|
```
|
||||||
|
sudo yunohost app install https://github.com/YunoHost-Apps/z-push_ynh/tree/testing --debug
|
||||||
|
ou
|
||||||
|
sudo yunohost app upgrade z-push -u https://github.com/YunoHost-Apps/z-push_ynh/tree/testing --debug
|
||||||
|
```
|
||||||
|
|
||||||
|
**Plus d'infos sur le packaging d'applications :** https://yunohost.org/packaging_apps
|
|
@ -1,7 +1,7 @@
|
||||||
;; Test complet
|
;; Test complet
|
||||||
; Manifest
|
; Manifest
|
||||||
domain="domain.tld" (DOMAIN)
|
domain="domain.tld"
|
||||||
path="/Microsoft-Server-ActiveSync" (PATH)
|
path="/Microsoft-Server-ActiveSync"
|
||||||
; Checks
|
; Checks
|
||||||
pkg_linter=1
|
pkg_linter=1
|
||||||
setup_sub_dir=1
|
setup_sub_dir=1
|
||||||
|
@ -18,6 +18,8 @@
|
||||||
# upgrade=1 from_commit=a05896f0e4f2b015dcf643c644ac6c98c2f6695b
|
# upgrade=1 from_commit=a05896f0e4f2b015dcf643c644ac6c98c2f6695b
|
||||||
# 2.6.1~ynh2
|
# 2.6.1~ynh2
|
||||||
upgrade=1 from_commit=8e99ec37fb90d1ac4f8eb2c838e6d2e1f5b0c905
|
upgrade=1 from_commit=8e99ec37fb90d1ac4f8eb2c838e6d2e1f5b0c905
|
||||||
|
# 2.6.1~ynh3
|
||||||
|
upgrade=1 from_commit=f101d8cb5701c46db0d6cf5aaa02b1e7f8e0dec2
|
||||||
backup_restore=1
|
backup_restore=1
|
||||||
multi_instance=1
|
multi_instance=1
|
||||||
port_already_use=0
|
port_already_use=0
|
||||||
|
@ -34,3 +36,5 @@ Notification=all
|
||||||
name=2.6.1~ynh1
|
name=2.6.1~ynh1
|
||||||
; commit=8e99ec37fb90d1ac4f8eb2c838e6d2e1f5b0c905
|
; commit=8e99ec37fb90d1ac4f8eb2c838e6d2e1f5b0c905
|
||||||
name=2.6.1~ynh2
|
name=2.6.1~ynh2
|
||||||
|
; commit=f101d8cb5701c46db0d6cf5aaa02b1e7f8e0dec2
|
||||||
|
name=2.6.1~ynh3
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
SOURCE_URL=https://github.com/Z-Hub/Z-Push/archive/2.6.1.tar.gz
|
SOURCE_URL=https://github.com/Z-Hub/Z-Push/archive/2.6.4.tar.gz
|
||||||
SOURCE_SUM=db97e9ff2eebec01c65e1a9150524a1fb45dc4b003955fb0847fbb069f143e33
|
SOURCE_SUM=7795ae7165fa3fb39a6ba40ca3e79609767e0c78c01857ede0f7014b90b27431
|
||||||
SOURCE_SUM_PRG=sha256sum
|
SOURCE_SUM_PRG=sha256sum
|
||||||
SOURCE_FORMAT=tar.gz
|
SOURCE_FORMAT=tar.gz
|
||||||
SOURCE_IN_SUBDIR=true
|
SOURCE_IN_SUBDIR=true
|
||||||
|
|
|
@ -38,7 +38,7 @@ define('CALDAV_SERVER', '__CALDAV_SERVER__');
|
||||||
// Server port
|
// Server port
|
||||||
define('CALDAV_PORT', '443');
|
define('CALDAV_PORT', '443');
|
||||||
|
|
||||||
// Path
|
// Base URL to principals calendar collection: use '%l' for local part or '%u' for full username
|
||||||
define('CALDAV_PATH', '__CALDAV_PATH__');
|
define('CALDAV_PATH', '__CALDAV_PATH__');
|
||||||
|
|
||||||
// Default CalDAV folder (calendar folder/principal). This will be marked as the default calendar in the mobile
|
// Default CalDAV folder (calendar folder/principal). This will be marked as the default calendar in the mobile
|
||||||
|
|
|
@ -42,6 +42,7 @@ define('CARDDAV_PORT', '443');
|
||||||
// http://localhost/caldav.php/test@domain.com/addresses/personal
|
// http://localhost/caldav.php/test@domain.com/addresses/personal
|
||||||
// http://localhost/caldav.php/test@domain.com/addresses/work
|
// http://localhost/caldav.php/test@domain.com/addresses/work
|
||||||
// You set the CARDDAV_PATH to '/caldav.php/%u/addresses/' and personal and work will be autodiscovered
|
// You set the CARDDAV_PATH to '/caldav.php/%u/addresses/' and personal and work will be autodiscovered
|
||||||
|
// %l: replaced with the local part of the username
|
||||||
// %u: replaced with the username
|
// %u: replaced with the username
|
||||||
// %d: replaced with the domain
|
// %d: replaced with the domain
|
||||||
// Add the trailing /
|
// Add the trailing /
|
||||||
|
@ -50,6 +51,7 @@ define('CARDDAV_PATH', '__CARDDAV_PATH__');
|
||||||
|
|
||||||
// Server path to the default addressbook
|
// Server path to the default addressbook
|
||||||
// Mobile device will create new contacts here. It must be under CARDDAV_PATH
|
// Mobile device will create new contacts here. It must be under CARDDAV_PATH
|
||||||
|
// %l: replaced with the local part of the username
|
||||||
// %u: replaced with the username
|
// %u: replaced with the username
|
||||||
// %d: replaced with the domain
|
// %d: replaced with the domain
|
||||||
// Add the trailing /
|
// Add the trailing /
|
||||||
|
@ -57,18 +59,17 @@ define('CARDDAV_DEFAULT_PATH', '__CARDDAV_DEFAULT_PATH__');
|
||||||
|
|
||||||
// Server path to the GAL addressbook. This addressbook is readonly and searchable by the user, but it will NOT be synced.
|
// Server path to the GAL addressbook. This addressbook is readonly and searchable by the user, but it will NOT be synced.
|
||||||
// If you don't want GAL, comment it
|
// If you don't want GAL, comment it
|
||||||
|
// %l: replaced with the local part of the username
|
||||||
// %u: replaced with the username
|
// %u: replaced with the username
|
||||||
// %d: replaced with the domain
|
// %d: replaced with the domain
|
||||||
// Add the trailing /
|
// Add the trailing /
|
||||||
|
|
||||||
//define('CARDDAV_GAL_PATH', '/caldav.php/%d/GAL/');
|
//define('CARDDAV_GAL_PATH', '/caldav.php/%d/GAL/');
|
||||||
|
|
||||||
|
|
||||||
// Minimal length for the search pattern to do the real search.
|
// Minimal length for the search pattern to do the real search.
|
||||||
|
|
||||||
//define('CARDDAV_GAL_MIN_LENGTH', 5);
|
//define('CARDDAV_GAL_MIN_LENGTH', 5);
|
||||||
|
|
||||||
// Addressbook display name, the name showed in the mobile device
|
// Addressbook display name, the name showed in the mobile device
|
||||||
|
// %l: replaced with the local part of the username
|
||||||
// %u: replaced with the username
|
// %u: replaced with the username
|
||||||
// %d: replaced with the domain
|
// %d: replaced with the domain
|
||||||
define('CARDDAV_CONTACTS_FOLDER_NAME', '%u Addressbook');
|
define('CARDDAV_CONTACTS_FOLDER_NAME', '%u Addressbook');
|
||||||
|
|
|
@ -223,3 +223,6 @@ define('IMAP_MEETING_USE_CALDAV', __FLAGTOCHANGE__);
|
||||||
// methods and you will be unable to log in. Uncomment the following line to disable that authentication method.
|
// methods and you will be unable to log in. Uncomment the following line to disable that authentication method.
|
||||||
// Multiple methods can be specified as a comma-separated string.
|
// Multiple methods can be specified as a comma-separated string.
|
||||||
// define('IMAP_DISABLE_AUTHENTICATOR', 'GSSAPI');
|
// define('IMAP_DISABLE_AUTHENTICATOR', 'GSSAPI');
|
||||||
|
|
||||||
|
// Specify Which Charset the IMAP Search is going to use, Default is 'UTF-8' but you could use 'US-ASCII'
|
||||||
|
define('IMAP_SEARCH_CHARSET', 'UTF-8');
|
||||||
|
|
|
@ -24,9 +24,8 @@
|
||||||
* Consult LICENSE file for details
|
* Consult LICENSE file for details
|
||||||
************************************************/
|
************************************************/
|
||||||
|
|
||||||
// LDAP host and port
|
// LDAP server uri
|
||||||
define("LDAP_HOST", "ldap://127.0.0.1/");
|
define("LDAP_SERVER_URI", "ldap://127.0.0.1:389/");
|
||||||
define("LDAP_PORT", "389");
|
|
||||||
|
|
||||||
// Set USER and PASSWORD if not using anonymous bind
|
// Set USER and PASSWORD if not using anonymous bind
|
||||||
define("ANONYMOUS_BIND", true);
|
define("ANONYMOUS_BIND", true);
|
||||||
|
@ -54,3 +53,6 @@ $ldap_field_map = array(
|
||||||
SYNC_GAL_MOBILEPHONE => 'mobile',
|
SYNC_GAL_MOBILEPHONE => 'mobile',
|
||||||
SYNC_GAL_EMAILADDRESS => 'mail',
|
SYNC_GAL_EMAILADDRESS => 'mail',
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// Fallback to displayname if firstname and lastname not set
|
||||||
|
define("LDAP_SEARCH_NAME_FALLBACK", false);
|
||||||
|
|
|
@ -65,7 +65,7 @@
|
||||||
* State migration script is available, more informations: https://wiki.z-hub.io/x/xIAa
|
* State migration script is available, more informations: https://wiki.z-hub.io/x/xIAa
|
||||||
*/
|
*/
|
||||||
define('STATE_MACHINE', 'FILE');
|
define('STATE_MACHINE', 'FILE');
|
||||||
define('STATE_DIR', '__STATEDIR__/');
|
define('STATE_DIR', '__DATADIR__/');
|
||||||
|
|
||||||
/**********************************************************************************
|
/**********************************************************************************
|
||||||
* IPC - InterProcessCommunication
|
* IPC - InterProcessCommunication
|
||||||
|
|
|
@ -4,11 +4,6 @@ location /Microsoft-Server-ActiveSync/ {
|
||||||
# Path to source
|
# Path to source
|
||||||
alias __FINALPATH__/ ;
|
alias __FINALPATH__/ ;
|
||||||
|
|
||||||
# Force usage of https
|
|
||||||
if ($scheme = http) {
|
|
||||||
rewrite ^ https://$server_name$request_uri? permanent;
|
|
||||||
}
|
|
||||||
|
|
||||||
index index.php;
|
index index.php;
|
||||||
|
|
||||||
# Common parameter to increase upload size limit in conjunction with dedicated php-fpm file
|
# Common parameter to increase upload size limit in conjunction with dedicated php-fpm file
|
||||||
|
|
0
doc/.gitkeep
Normal file
0
doc/.gitkeep
Normal file
1
doc/DESCRIPTION.md
Normal file
1
doc/DESCRIPTION.md
Normal file
|
@ -0,0 +1 @@
|
||||||
|
Z-Push is an Exchange ActiveSync fronted written in PHP which lets you synchronize emails (IMAP/SMTP backend) and calendar/contacts (cardDAV and caldDAV backend)
|
1
doc/DISCLAIMER.md
Normal file
1
doc/DISCLAIMER.md
Normal file
|
@ -0,0 +1 @@
|
||||||
|
* would be better to create a dedicated domain: autodiscover.yourdomain.org
|
0
doc/screenshots/.gitkeep
Normal file
0
doc/screenshots/.gitkeep
Normal file
|
@ -6,8 +6,14 @@
|
||||||
"en": "ActiveSync frontend that helps you synchronize emails, calendar and contacts",
|
"en": "ActiveSync frontend that helps you synchronize emails, calendar and contacts",
|
||||||
"fr": "Frontend ActiveSync qui permet de synchroniser emails, calendrier et contacts"
|
"fr": "Frontend ActiveSync qui permet de synchroniser emails, calendrier et contacts"
|
||||||
},
|
},
|
||||||
"version": "2.6.1~ynh3",
|
"version": "2.6.4~ynh1",
|
||||||
"url": "https://z-push.org",
|
"url": "https://z-push.org",
|
||||||
|
"upstream": {
|
||||||
|
"license": "AGPL-3.0-or-later",
|
||||||
|
"website": "http://z-push.org",
|
||||||
|
"admindoc": "https://wiki.z-hub.io/display/ZP/Documentation",
|
||||||
|
"code": "https://github.com/Z-Hub/Z-Push"
|
||||||
|
},
|
||||||
"license": "AGPL-3.0-or-later",
|
"license": "AGPL-3.0-or-later",
|
||||||
"maintainer": {
|
"maintainer": {
|
||||||
"name": "yalh76"
|
"name": "yalh76"
|
||||||
|
@ -21,7 +27,7 @@
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"requirements": {
|
"requirements": {
|
||||||
"yunohost": ">= 4.1.3"
|
"yunohost": ">= 4.3.0"
|
||||||
},
|
},
|
||||||
"multi_instance": true,
|
"multi_instance": true,
|
||||||
"services": [
|
"services": [
|
||||||
|
@ -29,11 +35,10 @@
|
||||||
"php7.3-fpm"
|
"php7.3-fpm"
|
||||||
],
|
],
|
||||||
"arguments": {
|
"arguments": {
|
||||||
"install" : [
|
"install": [
|
||||||
{
|
{
|
||||||
"name": "domain",
|
"name": "domain",
|
||||||
"type": "domain",
|
"type": "domain"
|
||||||
"example": "example.com"
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,9 +29,9 @@ app=$YNH_APP_INSTANCE_NAME
|
||||||
|
|
||||||
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
|
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
|
||||||
domain=$(ynh_app_setting_get --app=$app --key=domain)
|
domain=$(ynh_app_setting_get --app=$app --key=domain)
|
||||||
statedir=$(ynh_app_setting_get --app=$app --key=statedir)
|
|
||||||
final_logpath=$(ynh_app_setting_get --app=$app --key=final_logpath)
|
|
||||||
phpversion=$(ynh_app_setting_get --app=$app --key=phpversion)
|
phpversion=$(ynh_app_setting_get --app=$app --key=phpversion)
|
||||||
|
datadir=$(ynh_app_setting_get --app=$app --key=datadir)
|
||||||
|
final_logpath=$(ynh_app_setting_get --app=$app --key=final_logpath)
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# DECLARE DATA AND CONF FILES TO BACKUP
|
# DECLARE DATA AND CONF FILES TO BACKUP
|
||||||
|
@ -44,11 +44,11 @@ ynh_print_info --message="Declaring files to be backed up..."
|
||||||
|
|
||||||
ynh_backup --src_path="$final_path"
|
ynh_backup --src_path="$final_path"
|
||||||
|
|
||||||
# Backup statedir
|
#=================================================
|
||||||
ynh_backup --src_path="$statedir" --is_big
|
# BACKUP THE DATA DIR
|
||||||
|
#=================================================
|
||||||
|
|
||||||
# Backup logs
|
ynh_backup --src_path="$datadir" --is_big
|
||||||
ynh_backup --src_path="$final_logpath" --is_big
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# BACKUP THE NGINX CONFIGURATION
|
# BACKUP THE NGINX CONFIGURATION
|
||||||
|
|
|
@ -36,11 +36,6 @@ ynh_script_progression --message="Validating installation parameters..."
|
||||||
final_path=/var/www/$app
|
final_path=/var/www/$app
|
||||||
test ! -e "$final_path" || ynh_die --message="This path already contains a folder"
|
test ! -e "$final_path" || ynh_die --message="This path already contains a folder"
|
||||||
|
|
||||||
statedir="/home/yunohost.app/$app"
|
|
||||||
test ! -e "$statedir" || ynh_die --message="This path already contains a folder"
|
|
||||||
|
|
||||||
final_logpath="/var/log/$app"
|
|
||||||
|
|
||||||
# Register (book) web path
|
# Register (book) web path
|
||||||
ynh_webpath_register --app=$app --domain=$domain --path_url=$path_url
|
ynh_webpath_register --app=$app --domain=$domain --path_url=$path_url
|
||||||
|
|
||||||
|
@ -51,8 +46,6 @@ ynh_script_progression --message="Storing installation settings..."
|
||||||
|
|
||||||
ynh_app_setting_set --app=$app --key=domain --value=$domain
|
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=path --value=$path_url
|
||||||
ynh_app_setting_set --app=$app --key=statedir --value=$statedir
|
|
||||||
ynh_app_setting_set --app=$app --key=final_logpath --value=$final_logpath
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# STANDARD MODIFICATIONS
|
# STANDARD MODIFICATIONS
|
||||||
|
@ -69,7 +62,7 @@ ynh_install_app_dependencies $pkg_dependencies
|
||||||
ynh_script_progression --message="Configuring system user..."
|
ynh_script_progression --message="Configuring system user..."
|
||||||
|
|
||||||
# Create a system user
|
# Create a system user
|
||||||
ynh_system_user_create --username=$app --home_dir="$final_path"
|
ynh_system_user_create --username=$app --home_dir=$final_path
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
||||||
|
@ -107,16 +100,29 @@ phpversion=$(ynh_app_setting_get --app=$app --key=phpversion)
|
||||||
#=================================================
|
#=================================================
|
||||||
# SPECIFIC SETUP
|
# SPECIFIC SETUP
|
||||||
#=================================================
|
#=================================================
|
||||||
# CREATE STATEDIR AND FINAL_LOGPATH
|
# CREATE DATA DIRECTORY
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Creating statedir and final_logpath..."
|
ynh_script_progression --message="Creating a data directory..."
|
||||||
|
|
||||||
mkdir -p $statedir
|
datadir=/home/yunohost.app/$app
|
||||||
chmod 750 "$statedir"
|
ynh_app_setting_set --app=$app --key=datadir --value=$datadir
|
||||||
chmod -R o-rwx "$statedir"
|
|
||||||
chown -R $app:www-data "$statedir"
|
mkdir -p $datadir
|
||||||
|
|
||||||
|
chmod 750 "$datadir"
|
||||||
|
chmod -R o-rwx "$datadir"
|
||||||
|
chown -R $app:www-data "$datadir"
|
||||||
|
|
||||||
|
#=================================================
|
||||||
|
# CREATE FINAL LOG PATH
|
||||||
|
#=================================================
|
||||||
|
ynh_script_progression --message="Creating a final log path..."
|
||||||
|
|
||||||
|
final_logpath="/var/log/$app"
|
||||||
|
ynh_app_setting_set --app=$app --key=final_logpath --value=$final_logpath
|
||||||
|
|
||||||
mkdir -p $final_logpath
|
mkdir -p $final_logpath
|
||||||
|
|
||||||
chmod 750 "$final_logpath"
|
chmod 750 "$final_logpath"
|
||||||
chmod -R o-rwx "$final_logpath"
|
chmod -R o-rwx "$final_logpath"
|
||||||
chown -R $app:www-data "$final_logpath"
|
chown -R $app:www-data "$final_logpath"
|
||||||
|
@ -134,7 +140,7 @@ ynh_replace_string --match_string="__FINAL_LOGPATH__" --replace_string=$final_lo
|
||||||
|
|
||||||
# Storage of state_dir in /home/yunohost.app
|
# Storage of state_dir in /home/yunohost.app
|
||||||
# This contains the sync status in between device and z-push
|
# This contains the sync status in between device and z-push
|
||||||
ynh_replace_string --match_string="__STATEDIR__" --replace_string=$statedir --target_file="../conf/config.php"
|
ynh_replace_string --match_string="__DATADIR__" --replace_string=$datadir --target_file="../conf/config.php"
|
||||||
|
|
||||||
# Enable caldav carddav support
|
# Enable caldav carddav support
|
||||||
if yunohost app list | grep -q 'id: baikal' ; then
|
if yunohost app list | grep -q 'id: baikal' ; then
|
||||||
|
|
|
@ -18,18 +18,18 @@ app=$YNH_APP_INSTANCE_NAME
|
||||||
|
|
||||||
domain=$(ynh_app_setting_get --app=$app --key=domain)
|
domain=$(ynh_app_setting_get --app=$app --key=domain)
|
||||||
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
|
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
|
||||||
statedir=$(ynh_app_setting_get --app=$app --key=statedir)
|
datadir=$(ynh_app_setting_get --app=$app --key=datadir)
|
||||||
final_logpath=$(ynh_app_setting_get --app=$app --key=final_logpath)
|
final_logpath=$(ynh_app_setting_get --app=$app --key=final_logpath)
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# STANDARD REMOVE
|
# STANDARD REMOVE
|
||||||
#=================================================
|
#=================================================
|
||||||
# REMOVE DEPENDENCIES
|
# REMOVE LOGROTATE CONFIGURATION
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Removing dependencies..."
|
ynh_script_progression --message="Removing logrotate configuration..."
|
||||||
|
|
||||||
# Remove metapackage and its dependencies
|
# Remove the app-specific logrotate config
|
||||||
ynh_remove_app_dependencies
|
ynh_remove_logrotate
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# REMOVE APP MAIN DIR
|
# REMOVE APP MAIN DIR
|
||||||
|
@ -39,6 +39,17 @@ ynh_script_progression --message="Removing app main directory..."
|
||||||
# Remove the app directory securely
|
# Remove the app directory securely
|
||||||
ynh_secure_remove --file="$final_path"
|
ynh_secure_remove --file="$final_path"
|
||||||
|
|
||||||
|
#=================================================
|
||||||
|
# REMOVE DATA DIR
|
||||||
|
#=================================================
|
||||||
|
|
||||||
|
# Remove the data directory if --purge option is used
|
||||||
|
if [ "${YNH_APP_PURGE:-0}" -eq 1 ]
|
||||||
|
then
|
||||||
|
ynh_script_progression --message="Removing app data directory..."
|
||||||
|
ynh_secure_remove --file="$datadir"
|
||||||
|
fi
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# REMOVE NGINX CONFIGURATION
|
# REMOVE NGINX CONFIGURATION
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -56,21 +67,20 @@ ynh_script_progression --message="Removing PHP-FPM configuration..."
|
||||||
ynh_remove_fpm_config
|
ynh_remove_fpm_config
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# REMOVE LOGROTATE CONFIGURATION
|
# REMOVE DEPENDENCIES
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Removing logrotate configuration..."
|
ynh_script_progression --message="Removing dependencies..."
|
||||||
|
|
||||||
# Remove the app-specific logrotate config
|
# Remove metapackage and its dependencies
|
||||||
ynh_remove_logrotate
|
ynh_remove_app_dependencies
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# SPECIFIC REMOVE
|
# SPECIFIC REMOVE
|
||||||
#=================================================
|
#=================================================
|
||||||
# REMOVE STATEDIR AND FINAL_LOGPATH
|
# REMOVE VARIOUS FILES
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Removing statedir and final_logpath..."
|
ynh_script_progression --message="Removing various files..."
|
||||||
|
|
||||||
ynh_secure_remove --file="$statedir"
|
|
||||||
ynh_secure_remove --file="$final_logpath"
|
ynh_secure_remove --file="$final_logpath"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -30,17 +30,15 @@ app=$YNH_APP_INSTANCE_NAME
|
||||||
domain=$(ynh_app_setting_get --app=$app --key=domain)
|
domain=$(ynh_app_setting_get --app=$app --key=domain)
|
||||||
path_url=$(ynh_app_setting_get --app=$app --key=path)
|
path_url=$(ynh_app_setting_get --app=$app --key=path)
|
||||||
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
|
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
|
||||||
statedir=$(ynh_app_setting_get --app=$app --key=statedir)
|
|
||||||
final_logpath=$(ynh_app_setting_get --app=$app --key=final_logpath)
|
|
||||||
phpversion=$(ynh_app_setting_get --app=$app --key=phpversion)
|
phpversion=$(ynh_app_setting_get --app=$app --key=phpversion)
|
||||||
|
datadir=$(ynh_app_setting_get --app=$app --key=datadir)
|
||||||
|
final_logpath=$(ynh_app_setting_get --app=$app --key=final_logpath)
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# CHECK IF THE APP CAN BE RESTORED
|
# CHECK IF THE APP CAN BE RESTORED
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Validating restoration parameters..."
|
ynh_script_progression --message="Validating restoration parameters..."
|
||||||
|
|
||||||
ynh_webpath_available --domain=$domain --path_url=$path_url \
|
|
||||||
|| ynh_die --message="Path not available: ${domain}${path_url}"
|
|
||||||
test ! -d $final_path \
|
test ! -d $final_path \
|
||||||
|| ynh_die --message="There is already a directory: $final_path "
|
|| ynh_die --message="There is already a directory: $final_path "
|
||||||
|
|
||||||
|
@ -59,7 +57,7 @@ ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf"
|
||||||
ynh_script_progression --message="Recreating the dedicated system user..."
|
ynh_script_progression --message="Recreating the dedicated system user..."
|
||||||
|
|
||||||
# Create the dedicated user (if not existing)
|
# Create the dedicated user (if not existing)
|
||||||
ynh_system_user_create --username=$app --home_dir="$final_path"
|
ynh_system_user_create --username=$app --home_dir=$final_path
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# RESTORE THE APP MAIN DIR
|
# RESTORE THE APP MAIN DIR
|
||||||
|
@ -68,24 +66,27 @@ ynh_script_progression --message="Restoring the app main directory..."
|
||||||
|
|
||||||
ynh_restore_file --origin_path="$final_path"
|
ynh_restore_file --origin_path="$final_path"
|
||||||
|
|
||||||
# Restore statedir
|
chmod 750 "$final_path"
|
||||||
ynh_restore_file --origin_path="$statedir" --not_mandatory
|
chmod -R o-rwx "$final_path"
|
||||||
mkdir -p $statedir
|
chown -R $app:www-data "$final_path"
|
||||||
chmod 750 "$statedir"
|
|
||||||
chmod -R o-rwx "$statedir"
|
|
||||||
chown -R $app:www-data "$statedir"
|
|
||||||
|
|
||||||
# Restore logs, data & permissions
|
#=================================================
|
||||||
ynh_restore_file --origin_path="$final_logpath" --not_mandatory
|
# RESTORE THE DATA DIRECTORY
|
||||||
mkdir -p $final_logpath
|
#=================================================
|
||||||
chmod 750 "$final_logpath"
|
ynh_script_progression --message="Restoring the data directory..."
|
||||||
chmod -R o-rwx "$final_logpath"
|
|
||||||
chown -R $app:www-data "$final_logpath"
|
ynh_restore_file --origin_path="$datadir" --not_mandatory
|
||||||
|
|
||||||
|
mkdir -p $datadir
|
||||||
|
|
||||||
|
chmod 750 "$datadir"
|
||||||
|
chmod -R o-rwx "$datadir"
|
||||||
|
chown -R $app:www-data "$datadir"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# RESTORE THE PHP-FPM CONFIGURATION
|
# RESTORE THE PHP-FPM CONFIGURATION
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Restoring PHP-FPM configuration..."
|
ynh_script_progression --message="Restoring the PHP-FPM configuration..."
|
||||||
|
|
||||||
ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf"
|
ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf"
|
||||||
|
|
||||||
|
|
|
@ -19,7 +19,7 @@ app=$YNH_APP_INSTANCE_NAME
|
||||||
domain=$(ynh_app_setting_get --app=$app --key=domain)
|
domain=$(ynh_app_setting_get --app=$app --key=domain)
|
||||||
path_url=$(ynh_app_setting_get --app=$app --key=path)
|
path_url=$(ynh_app_setting_get --app=$app --key=path)
|
||||||
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
|
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
|
||||||
statedir=$(ynh_app_setting_get --app=$app --key=statedir)
|
datadir=$(ynh_app_setting_get --app=$app --key=datadir)
|
||||||
final_logpath=$(ynh_app_setting_get --app=$app --key=final_logpath)
|
final_logpath=$(ynh_app_setting_get --app=$app --key=final_logpath)
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -29,32 +29,6 @@ ynh_script_progression --message="Checking version..."
|
||||||
|
|
||||||
upgrade_type=$(ynh_check_app_version_changed)
|
upgrade_type=$(ynh_check_app_version_changed)
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# ENSURE DOWNWARD COMPATIBILITY
|
|
||||||
#=================================================
|
|
||||||
ynh_script_progression --message="Ensuring downward compatibility..."
|
|
||||||
|
|
||||||
if [ -z "$statedir" ];
|
|
||||||
then
|
|
||||||
statedir="/home/yunohost.app/$app"
|
|
||||||
ynh_app_setting_set --app=$app --key=statedir --value=$statedir
|
|
||||||
mkdir -p $statedir
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -z "$final_logpath" ];
|
|
||||||
then
|
|
||||||
final_logpath="/var/log/$app"
|
|
||||||
ynh_app_setting_set --app=$app --key=final_logpath --value=$final_logpath
|
|
||||||
mkdir -p $final_logpath
|
|
||||||
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
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -71,13 +45,40 @@ ynh_abort_if_errors
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# STANDARD UPGRADE STEPS
|
# STANDARD UPGRADE STEPS
|
||||||
|
#=================================================
|
||||||
|
# ENSURE DOWNWARD COMPATIBILITY
|
||||||
|
#=================================================
|
||||||
|
ynh_script_progression --message="Ensuring downward compatibility..."
|
||||||
|
|
||||||
|
if [ -z "$datadir" ];
|
||||||
|
then
|
||||||
|
datadir="/home/yunohost.app/$app"
|
||||||
|
ynh_app_setting_set --app=$app --key=datadir --value=$datadir
|
||||||
|
ynh_app_setting_delete --app=$app --key=statedir
|
||||||
|
mkdir -p $datadir
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -z "$final_logpath" ];
|
||||||
|
then
|
||||||
|
final_logpath="/var/log/$app"
|
||||||
|
ynh_app_setting_set --app=$app --key=final_logpath --value=$final_logpath
|
||||||
|
mkdir -p $final_logpath
|
||||||
|
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
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# CREATE DEDICATED USER
|
# CREATE DEDICATED USER
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Making sure dedicated system user exists..."
|
ynh_script_progression --message="Making sure dedicated system user exists..."
|
||||||
|
|
||||||
# Create a dedicated user (if not existing)
|
# Create a dedicated user (if not existing)
|
||||||
ynh_system_user_create --username=$app --home_dir="$final_path"
|
ynh_system_user_create --username=$app --home_dir=$final_path
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
||||||
|
@ -137,7 +138,7 @@ ynh_replace_string --match_string="__FINAL_LOGPATH__" --replace_string="$final_l
|
||||||
|
|
||||||
# Storage of state_dir in /home/yunohost.app
|
# Storage of state_dir in /home/yunohost.app
|
||||||
# This contains the sync status in between device and z-push
|
# This contains the sync status in between device and z-push
|
||||||
ynh_replace_string __STATEDIR__ $statedir ../conf/config.php
|
ynh_replace_string __DATADIR__ $datadir ../conf/config.php
|
||||||
|
|
||||||
# Enable caldav carddav support
|
# Enable caldav carddav support
|
||||||
if yunohost app list | grep -q 'id: baikal' ; then
|
if yunohost app list | grep -q 'id: baikal' ; then
|
||||||
|
|
Loading…
Add table
Reference in a new issue