mirror of
https://github.com/YunoHost-Apps/piwigo_ynh.git
synced 2024-09-03 20:06:03 +02:00
Merge 637ffdcbff
into d0dd98551c
This commit is contained in:
commit
80f82e11b6
13 changed files with 34 additions and 1046 deletions
|
@ -5,7 +5,7 @@ It shall NOT be edited by hand.
|
|||
|
||||
# Piwigo for YunoHost
|
||||
|
||||
[](https://dash.yunohost.org/appci/app/piwigo)  
|
||||
[](https://ci-apps.yunohost.org/ci/apps/piwigo/)  
|
||||
|
||||
[](https://install-app.yunohost.org/?app=piwigo)
|
||||
|
||||
|
@ -19,7 +19,7 @@ It shall NOT be edited by hand.
|
|||
Piwigo is a photo gallery software for the web, built by an active community of users and developers. Extensions make Piwigo easily customizable.
|
||||
|
||||
|
||||
**Shipped version:** 14.3.0~ynh1
|
||||
**Shipped version:** 14.4.0~ynh1
|
||||
|
||||
**Demo:** <https://piwigo.org/demo>
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@ No se debe editar a mano.
|
|||
|
||||
# Piwigo para Yunohost
|
||||
|
||||
[](https://dash.yunohost.org/appci/app/piwigo)  
|
||||
[](https://ci-apps.yunohost.org/ci/apps/piwigo/)  
|
||||
|
||||
[](https://install-app.yunohost.org/?app=piwigo)
|
||||
|
||||
|
@ -19,7 +19,7 @@ No se debe editar a mano.
|
|||
Piwigo is a photo gallery software for the web, built by an active community of users and developers. Extensions make Piwigo easily customizable.
|
||||
|
||||
|
||||
**Versión actual:** 14.3.0~ynh1
|
||||
**Versión actual:** 14.4.0~ynh1
|
||||
|
||||
**Demo:** <https://piwigo.org/demo>
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@ EZ editatu eskuz.
|
|||
|
||||
# Piwigo YunoHost-erako
|
||||
|
||||
[](https://dash.yunohost.org/appci/app/piwigo)  
|
||||
[](https://ci-apps.yunohost.org/ci/apps/piwigo/)  
|
||||
|
||||
[](https://install-app.yunohost.org/?app=piwigo)
|
||||
|
||||
|
@ -19,7 +19,7 @@ EZ editatu eskuz.
|
|||
Piwigo is a photo gallery software for the web, built by an active community of users and developers. Extensions make Piwigo easily customizable.
|
||||
|
||||
|
||||
**Paketatutako bertsioa:** 14.3.0~ynh1
|
||||
**Paketatutako bertsioa:** 14.4.0~ynh1
|
||||
|
||||
**Demoa:** <https://piwigo.org/demo>
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@ Il NE doit PAS être modifié à la main.
|
|||
|
||||
# Piwigo pour YunoHost
|
||||
|
||||
[](https://dash.yunohost.org/appci/app/piwigo)  
|
||||
[](https://ci-apps.yunohost.org/ci/apps/piwigo/)  
|
||||
|
||||
[](https://install-app.yunohost.org/?app=piwigo)
|
||||
|
||||
|
@ -19,7 +19,7 @@ Il NE doit PAS être modifié à la main.
|
|||
Piwigo est un logiciel de galerie photo pour le web, construit par une communauté active d'utilisateurs et de développeurs. Des extensions rendent Piwigo facilement personnalisable.
|
||||
|
||||
|
||||
**Version incluse :** 14.3.0~ynh1
|
||||
**Version incluse :** 14.4.0~ynh1
|
||||
|
||||
**Démo :** <https://piwigo.org/demo>
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@ NON debe editarse manualmente.
|
|||
|
||||
# Piwigo para YunoHost
|
||||
|
||||
[](https://dash.yunohost.org/appci/app/piwigo)  
|
||||
[](https://ci-apps.yunohost.org/ci/apps/piwigo/)  
|
||||
|
||||
[](https://install-app.yunohost.org/?app=piwigo)
|
||||
|
||||
|
@ -19,7 +19,7 @@ NON debe editarse manualmente.
|
|||
Piwigo is a photo gallery software for the web, built by an active community of users and developers. Extensions make Piwigo easily customizable.
|
||||
|
||||
|
||||
**Versión proporcionada:** 14.3.0~ynh1
|
||||
**Versión proporcionada:** 14.4.0~ynh1
|
||||
|
||||
**Demo:** <https://piwigo.org/demo>
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
# YunoHost 上的 Piwigo
|
||||
|
||||
[](https://dash.yunohost.org/appci/app/piwigo)  
|
||||
[](https://ci-apps.yunohost.org/ci/apps/piwigo/)  
|
||||
|
||||
[](https://install-app.yunohost.org/?app=piwigo)
|
||||
|
||||
|
@ -19,7 +19,7 @@
|
|||
Piwigo is a photo gallery software for the web, built by an active community of users and developers. Extensions make Piwigo easily customizable.
|
||||
|
||||
|
||||
**分发版本:** 14.3.0~ynh1
|
||||
**分发版本:** 14.4.0~ynh1
|
||||
|
||||
**演示:** <https://piwigo.org/demo>
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -7,7 +7,7 @@ name = "Piwigo"
|
|||
description.en = "Open source photo gallery for the web"
|
||||
description.fr = "Galerie de photos open source pour le web"
|
||||
|
||||
version = "14.3.0~ynh1"
|
||||
version = "14.4.0~ynh1"
|
||||
|
||||
maintainers = ["JimboJoe"]
|
||||
|
||||
|
@ -48,7 +48,7 @@ ram.runtime = "50M"
|
|||
ask.fr = "Choisissez la langue de l'application"
|
||||
type = "select"
|
||||
choices = ["fr_FR", "en_UK"]
|
||||
default = "en_UK"
|
||||
default = "fr_FR"
|
||||
|
||||
[install.admin]
|
||||
type = "user"
|
||||
|
@ -58,33 +58,31 @@ ram.runtime = "50M"
|
|||
|
||||
[resources]
|
||||
[resources.sources.main]
|
||||
url = "https://piwigo.org/download/dlcounter.php?code=14.3.0"
|
||||
sha256 = "ab1d329afbb092ef74534bc09f56ef75a81d26443383e6ae47fe9801808552ef"
|
||||
url = "https://piwigo.org/download/dlcounter.php?code=14.4.0"
|
||||
sha256 = "d9c4c422626537e1beb65a9cadcf712a5ead2f63cae3775d85ae17241c3e3dc0"
|
||||
format = "zip"
|
||||
|
||||
autoupdate.strategy = "latest_github_release"
|
||||
|
||||
[resources.sources.ldap_plugin]
|
||||
url = "https://piwigo.org/ext/download.php?rid=7036"
|
||||
sha256 = "3c22652f6c0653aaeebe239435796748ee57612ad44e8e5f2553277545d36e5e"
|
||||
url = "https://piwigo.org/ext/download.php?rid=8962"
|
||||
sha256 = "ba34c461c46c0558b05a33290a009b24461aedc7701e7cf642f3a4d667150787"
|
||||
format = "zip"
|
||||
|
||||
autoupdate.upstream = "https://github.com/kipjr/ldap_login"
|
||||
autoupdate.strategy = "latest_github_release"
|
||||
|
||||
[resources.sources.log_failed_logins_plugin]
|
||||
url = "http://piwigo.org/ext/download.php?rid=5525"
|
||||
sha256 = "85b9a06f2c7ca8ae9698e6151c7631f519c945f696b02da72f9ff53243d7e4ca"
|
||||
url = "http://piwigo.org/ext/download.php?rid=8501"
|
||||
sha256 = "8c21fb42675968ffaf41bd0735cf1b0541756550e0a6b6d3357f3aaaa84f1bd5"
|
||||
in_subdir = false
|
||||
format = "zip"
|
||||
|
||||
[resources.system_user]
|
||||
allow_email = true
|
||||
#allow_email = true
|
||||
|
||||
[resources.install_dir]
|
||||
|
||||
[resources.data_dir]
|
||||
|
||||
[resources.permissions]
|
||||
main.url = "/"
|
||||
|
||||
|
|
|
@ -8,16 +8,6 @@
|
|||
# PERSONAL HELPERS
|
||||
#=================================================
|
||||
|
||||
_create_data_dirs_if_required() {
|
||||
dirs=(_data galleries upload)
|
||||
for dir in "${dirs[@]}"; do
|
||||
if [ ! -d "$data_dir/$dir" ]; then
|
||||
rsync -a "$install_dir/$dir/" "$data_dir/$dir/"
|
||||
fi
|
||||
ynh_secure_remove "$install_dir/$dir"
|
||||
done
|
||||
}
|
||||
|
||||
#=================================================
|
||||
# EXPERIMENTAL HELPERS
|
||||
#=================================================
|
||||
|
|
|
@ -19,12 +19,6 @@ ynh_print_info --message="Declaring files to be backed up..."
|
|||
|
||||
ynh_backup --src_path="$install_dir"
|
||||
|
||||
#=================================================
|
||||
# BACKUP THE DATA DIR
|
||||
#=================================================
|
||||
|
||||
ynh_backup --src_path="$data_dir" --is_big
|
||||
|
||||
#=================================================
|
||||
# BACKUP THE SYSTEM CONFIGURATION
|
||||
#=================================================
|
||||
|
|
|
@ -21,14 +21,11 @@ ynh_setup_source --dest_dir="$install_dir"
|
|||
ynh_setup_source --dest_dir="$install_dir/plugins/Ldap_Login" --source_id=ldap_plugin
|
||||
ynh_setup_source --dest_dir="$install_dir/plugins" --source_id=log_failed_logins_plugin
|
||||
|
||||
_create_data_dirs_if_required
|
||||
#_create_data_dirs_if_required
|
||||
|
||||
chmod -R o-rwx "$install_dir"
|
||||
chown -R "$app:www-data" "$install_dir"
|
||||
|
||||
chmod -R o-rwx "$data_dir"
|
||||
chown -R "$app:www-data" "$data_dir"
|
||||
|
||||
#=================================================
|
||||
# SYSTEM CONFIGURATIONS
|
||||
#=================================================
|
||||
|
@ -71,13 +68,17 @@ ynh_script_progression --message="Configuring LDAP plugin..." --weight=2
|
|||
|
||||
# Login with admin account
|
||||
ynh_local_curl "/ws.php?format=json" "method=pwg.session.login" "username=$admin" "password=$password"
|
||||
|
||||
# Get session token
|
||||
status=$(ynh_local_curl "/ws.php?format=json" "method=pwg.session.getStatus")
|
||||
pwg_token=$(jq --raw-output .result.pwg_token <<< "$status")
|
||||
|
||||
# Install the Ldap_Login plugin
|
||||
ynh_local_curl "/ws.php?format=json" "method=pwg.plugins.performAction" "action=install" "plugin=Ldap_Login" "pwg_token=$pwg_token"
|
||||
|
||||
# Activate the Ldap_Login plugin
|
||||
ynh_local_curl "/ws.php?format=json" "method=pwg.plugins.performAction" "action=activate" "plugin=Ldap_Login" "pwg_token=$pwg_token"
|
||||
|
||||
# Log out
|
||||
ynh_local_curl "/ws.php?format=json" "method=pwg.session.logout"
|
||||
|
||||
|
|
|
@ -18,15 +18,6 @@ ynh_restore_file --origin_path="$install_dir"
|
|||
chmod -R o-rwx "$install_dir"
|
||||
chown -R "$app:www-data" "$install_dir"
|
||||
|
||||
#=================================================
|
||||
# RESTORE THE DATA DIRECTORY
|
||||
#=================================================
|
||||
ynh_script_progression --message="Restoring the data directory..." --weight=2
|
||||
|
||||
ynh_restore_file --origin_path="$data_dir" --not_mandatory
|
||||
|
||||
chown -R "$app:www-data" "$data_dir"
|
||||
|
||||
#=================================================
|
||||
# RESTORE THE MYSQL DATABASE
|
||||
#=================================================
|
||||
|
|
|
@ -25,15 +25,10 @@ fi
|
|||
#=================================================
|
||||
ynh_script_progression --message="Upgrading source files..." --weight=3
|
||||
|
||||
ynh_setup_source --dest_dir="$install_dir" --full_replace=1 --keep="local/config/config.inc.php local/config/database.inc.php"
|
||||
ynh_setup_source --dest_dir="$install_dir" --full_replace=1 --keep="local/config/config.inc.php local/config/database.inc.php _data galleries upload"
|
||||
ynh_setup_source --dest_dir="$install_dir/plugins/Ldap_Login" --source_id=ldap_plugin --full_replace=1
|
||||
ynh_setup_source --dest_dir="$install_dir/plugins" --source_id=log_failed_logins_plugin --full_replace=1
|
||||
|
||||
_create_data_dirs_if_required
|
||||
|
||||
chmod -R o-rwx "$data_dir"
|
||||
chown -R "$app:www-data" "$data_dir"
|
||||
|
||||
chmod -R o-rwx "$install_dir"
|
||||
chown -R "$app:www-data" "$install_dir"
|
||||
|
||||
|
@ -83,11 +78,14 @@ ynh_mysql_connect_as --user="$db_name" --password="$db_pwd" --database="$db_name
|
|||
|
||||
# ... isn't there a way to enable the damn LDAP login plugin from the command line or something ...
|
||||
ynh_local_curl "/ws.php?format=json" "method=pwg.session.login" "username=$admin" "password=$password"
|
||||
|
||||
# Get session token
|
||||
status=$(ynh_local_curl "/ws.php?format=json" "method=pwg.session.getStatus")
|
||||
pwg_token=$(jq --raw-output .result.pwg_token <<< "$status")
|
||||
|
||||
# Activate the Ldap_Login plugin
|
||||
ynh_local_curl "/ws.php?format=json" "method=pwg.plugins.performAction" "action=activate" "plugin=Ldap_Login" "pwg_token=$pwg_token"
|
||||
|
||||
# Log out
|
||||
ynh_local_curl "/ws.php?format=json" "method=pwg.session.logout"
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue