mirror of
https://github.com/YunoHost-Apps/spip_ynh.git
synced 2024-09-03 20:25:59 +02:00
commit
173d6e01bd
7 changed files with 31 additions and 28 deletions
|
@ -14,7 +14,7 @@ SPIP is a publishing system for the Internet in which great importance is attach
|
||||||
|
|
||||||
Source: [spip.net](http://www.spip.net/en_rubrique25.html)
|
Source: [spip.net](http://www.spip.net/en_rubrique25.html)
|
||||||
|
|
||||||
**Shipped version:** 3.2.11
|
**Shipped version:** 4.0.0
|
||||||
|
|
||||||
## Screenshots
|
## Screenshots
|
||||||
|
|
||||||
|
|
|
@ -14,7 +14,7 @@ SPIP est un système de publication pour l’Internet qui s’attache particuli
|
||||||
|
|
||||||
Source: [spip.net](http://www.spip.net/fr_rubrique91.html)
|
Source: [spip.net](http://www.spip.net/fr_rubrique91.html)
|
||||||
|
|
||||||
**Version incluse:** 3.2.11
|
**Version incluse:** 4.0.0
|
||||||
|
|
||||||
## Captures d'écran
|
## Captures d'écran
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
SOURCE_URL=https://files.spip.net/spip/archives/spip-v3.2.11.zip
|
SOURCE_URL=https://files.spip.net/spip/archives/spip-v4.0.0.zip
|
||||||
SOURCE_SUM=6b713ec10d9ceff367ec7f76f32d9438b76919f493cae3ef3a3db0cfce570df3
|
SOURCE_SUM=d17513fcdac32c07b327ad18032facfcadd174719fba2d4598f10b1c931b7e5a
|
||||||
SOURCE_SUM_PRG=sha256sum
|
SOURCE_SUM_PRG=sha256sum
|
||||||
SOURCE_FORMAT=zip
|
SOURCE_FORMAT=zip
|
||||||
SOURCE_IN_SUBDIR=false
|
SOURCE_IN_SUBDIR=false
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
"en": "CMS with a focus on collaborative edition and multilingualism",
|
"en": "CMS with a focus on collaborative edition and multilingualism",
|
||||||
"fr": "CMS conçu pour l'édition collaborative et le multilinguisme"
|
"fr": "CMS conçu pour l'édition collaborative et le multilinguisme"
|
||||||
},
|
},
|
||||||
"version": "3.2.11~ynh2",
|
"version": "4.0.0~ynh1",
|
||||||
"url": "http://www.spip.net/",
|
"url": "http://www.spip.net/",
|
||||||
"license": "GPL-3.0-or-later",
|
"license": "GPL-3.0-or-later",
|
||||||
"maintainer": {
|
"maintainer": {
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
# SET ALL CONSTANTS
|
# SET ALL CONSTANTS
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
YNH_PHP_VERSION="7.2"
|
YNH_PHP_VERSION="7.3"
|
||||||
|
|
||||||
extra_php_dependencies="php${YNH_PHP_VERSION}-sqlite3 php${YNH_PHP_VERSION}-mysql php${YNH_PHP_VERSION}-xml php${YNH_PHP_VERSION}-gd"
|
extra_php_dependencies="php${YNH_PHP_VERSION}-sqlite3 php${YNH_PHP_VERSION}-mysql php${YNH_PHP_VERSION}-xml php${YNH_PHP_VERSION}-gd"
|
||||||
|
|
||||||
|
|
|
@ -52,7 +52,6 @@ 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=admin --value=$admin
|
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=password --value=$password
|
||||||
ynh_app_setting_set --app=$app --key=is_public --value=$is_public
|
|
||||||
ynh_app_setting_set --app=$app --key=users_status --value=$users_status
|
ynh_app_setting_set --app=$app --key=users_status --value=$users_status
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -122,7 +121,7 @@ ynh_permission_update --permission="main" --add="visitors"
|
||||||
# Installation with curl
|
# Installation with curl
|
||||||
ynh_script_progression --message="Finalizing installation..."
|
ynh_script_progression --message="Finalizing installation..."
|
||||||
ynh_local_curl "/ecrire/?suivant" "exec=install" "etape=chmod"
|
ynh_local_curl "/ecrire/?suivant" "exec=install" "etape=chmod"
|
||||||
ynh_local_curl "/ecrire/?suivant" "exec=install" "etape=2" "chmod=755" "adresse_db=localhost" "login_db=$db_name" "pass_db=$db_pwd" "server_db=mysql"
|
ynh_local_curl "/ecrire/?suivant" "exec=install" "etape=2" "chmod=750" "adresse_db=localhost" "login_db=$db_name" "pass_db=$db_pwd" "server_db=mysql"
|
||||||
ynh_local_curl "/ecrire/?suivant" "exec=install" "etape=3" "adresse_db=localhost" "login_db=$db_name" "pass_db=$db_pwd" "server_db=mysql" "choix_db=$db_name" "tprefix=$db_name"
|
ynh_local_curl "/ecrire/?suivant" "exec=install" "etape=3" "adresse_db=localhost" "login_db=$db_name" "pass_db=$db_pwd" "server_db=mysql" "choix_db=$db_name" "tprefix=$db_name"
|
||||||
# For now spip have a problem with LDAP
|
# For now spip have a problem with LDAP
|
||||||
#ynh_local_curl "/ecrire/?suivant" "exec=install" "etape=ldap1"
|
#ynh_local_curl "/ecrire/?suivant" "exec=install" "etape=ldap1"
|
||||||
|
|
|
@ -20,7 +20,6 @@ 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)
|
||||||
admin=$(ynh_app_setting_get --app=$app --key=admin)
|
admin=$(ynh_app_setting_get --app=$app --key=admin)
|
||||||
password=$(ynh_app_setting_get --app=$app --key=password)
|
password=$(ynh_app_setting_get --app=$app --key=password)
|
||||||
is_public=$(ynh_app_setting_get --app=$app --key=is_public)
|
|
||||||
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
|
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
|
||||||
users_status=$(ynh_app_setting_get --app=$app --key=users_status)
|
users_status=$(ynh_app_setting_get --app=$app --key=users_status)
|
||||||
db_name=$(ynh_app_setting_get --app=$app --key=db_name)
|
db_name=$(ynh_app_setting_get --app=$app --key=db_name)
|
||||||
|
@ -60,13 +59,10 @@ ynh_abort_if_errors
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Ensuring downward compatibility..."
|
ynh_script_progression --message="Ensuring downward compatibility..."
|
||||||
|
|
||||||
# Fix is_public as a boolean value
|
is_public=$(ynh_app_setting_get --app=$app --key=is_public)
|
||||||
if [ "$is_public" = "Yes" ]; then
|
# Remove is_public
|
||||||
ynh_app_setting_set --app=$app --key=is_public --value=1
|
if [ -n "$is_public" ]; then
|
||||||
is_public=1
|
ynh_app_setting_delete --app=$app --key=is_public
|
||||||
elif [ "$is_public" = "No" ]; then
|
|
||||||
ynh_app_setting_set --app=$app --key=is_public --value=0
|
|
||||||
is_public=0
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# If db_name doesn't exist, create it
|
# If db_name doesn't exist, create it
|
||||||
|
@ -170,17 +166,24 @@ chown -R $app:www-data "$final_path"
|
||||||
|
|
||||||
# Set the app as temporarily public for curl call
|
# Set the app as temporarily public for curl call
|
||||||
ynh_script_progression --message="Configuring SSOwat..."
|
ynh_script_progression --message="Configuring SSOwat..."
|
||||||
# Making the app public for curl
|
|
||||||
ynh_permission_update --permission="main" --add="visitors"
|
|
||||||
|
if ! ynh_permission_has_user --permission=main --user="visitors"; then
|
||||||
|
is_public=0
|
||||||
|
# Making the app public for curl
|
||||||
|
ynh_permission_update --permission="main" --add="visitors"
|
||||||
|
else
|
||||||
|
is_public=1
|
||||||
|
fi
|
||||||
|
|
||||||
ynh_backup_if_checksum_is_different --file="$final_path/config/connect.php"
|
ynh_backup_if_checksum_is_different --file="$final_path/config/connect.php"
|
||||||
|
|
||||||
ynh_secure_remove --file="$final_path/config/connect.php"
|
mv $final_path/config/connect.php $final_path/config/connect.php.ynh_bkp
|
||||||
|
|
||||||
# Installation with curl
|
# Installation with curl
|
||||||
ynh_script_progression --message="Finalizing installation..."
|
ynh_script_progression --message="Finalizing installation..."
|
||||||
ynh_local_curl "/ecrire/?suivant" "exec=install" "etape=chmod"
|
ynh_local_curl "/ecrire/?suivant" "exec=install" "etape=chmod"
|
||||||
ynh_local_curl "/ecrire/?suivant" "exec=install" "etape=2" "chmod=755" "adresse_db=localhost" "login_db=$db_name" "pass_db=$db_pwd" "server_db=mysql"
|
ynh_local_curl "/ecrire/?suivant" "exec=install" "etape=2" "chmod=750" "adresse_db=localhost" "login_db=$db_name" "pass_db=$db_pwd" "server_db=mysql"
|
||||||
ynh_local_curl "/ecrire/?suivant" "exec=install" "etape=3" "adresse_db=localhost" "login_db=$db_name" "pass_db=$db_pwd" "server_db=mysql" "choix_db=$db_name" "tprefix=$db_name"
|
ynh_local_curl "/ecrire/?suivant" "exec=install" "etape=3" "adresse_db=localhost" "login_db=$db_name" "pass_db=$db_pwd" "server_db=mysql" "choix_db=$db_name" "tprefix=$db_name"
|
||||||
# For now spip have a problem with LDAP
|
# For now spip have a problem with LDAP
|
||||||
#ynh_local_curl "/ecrire/?suivant" "exec=install" "etape=ldap1"
|
#ynh_local_curl "/ecrire/?suivant" "exec=install" "etape=ldap1"
|
||||||
|
@ -206,9 +209,6 @@ email=$(yunohost user info $admin | grep mail: | cut -d' ' -f2 | tr -d '\n')
|
||||||
ynh_local_curl "/ecrire/?suivant" "exec=install" "etape=3b" "adresse_db=localhost" "login_db=$db_name" "pass_db=$db_pwd" "server_db=mysql" "sel_db=$db_name" "nom=$admin" "email=$email" "login=$admin" "pass=$password" "pass_verif=$password"
|
ynh_local_curl "/ecrire/?suivant" "exec=install" "etape=3b" "adresse_db=localhost" "login_db=$db_name" "pass_db=$db_pwd" "server_db=mysql" "sel_db=$db_name" "nom=$admin" "email=$email" "login=$admin" "pass=$password" "pass_verif=$password"
|
||||||
ynh_local_curl "/ecrire/?suivant" "exec=install" "etape=fin"
|
ynh_local_curl "/ecrire/?suivant" "exec=install" "etape=fin"
|
||||||
|
|
||||||
# Remove the public access
|
|
||||||
ynh_permission_update --permission="main" --remove="visitors"
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# UPDATE A CONFIG FILE
|
# UPDATE A CONFIG FILE
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -220,6 +220,12 @@ cp ../conf/mes_options.php $final_path/config/mes_options.php
|
||||||
# STORE THE CONFIG FILE CHECKSUM
|
# STORE THE CONFIG FILE CHECKSUM
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
|
if [ ! -f $final_path/config/connect.php ]; then
|
||||||
|
mv $final_path/config/connect.php.ynh_bkp $final_path/config/connect.php
|
||||||
|
else
|
||||||
|
ynh_secure_remove --file="$final_path/config/connect.php.ynh_bkp"
|
||||||
|
fi
|
||||||
|
|
||||||
ynh_store_file_checksum --file="$final_path/config/connect.php"
|
ynh_store_file_checksum --file="$final_path/config/connect.php"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -229,12 +235,10 @@ ynh_store_file_checksum --file="$final_path/config/connect.php"
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Configuring permissions..."
|
ynh_script_progression --message="Configuring permissions..."
|
||||||
|
|
||||||
# Make app public if necessary
|
# Make app private if necessary
|
||||||
if [ $is_public -eq 1 ]
|
if [ $is_public -eq 0 ]
|
||||||
then
|
then
|
||||||
# Everyone can access the app.
|
ynh_permission_update --permission="main" --remove="visitors"
|
||||||
# The "main" permission is automatically created before the install script.
|
|
||||||
ynh_permission_update --permission="main" --add="visitors"
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
Loading…
Reference in a new issue