1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/movim_ynh.git synced 2024-09-03 19:46:19 +02:00

upgrade to 0.14.1

This commit is contained in:
Jean-Baptiste Holcroft 2019-03-01 22:21:17 +01:00
parent 99a03e8ba4
commit 805903ed9b
8 changed files with 40 additions and 25 deletions

View file

@ -1,4 +1,4 @@
SOURCE_URL=https://github.com/movim/movim/archive/v0.13.tar.gz SOURCE_URL=https://github.com/movim/movim/archive/0.14.1.tar.gz
SOURCE_SUM=7aa5b2b6cd97e87a440981cfb6788a6f04ffd5eb4545026c49e1c61771593d11 SOURCE_SUM=aa764569952fab61e681a54a03825308188931fa478783b32b58fb15a083292c
SOURCE_SUM_PRG=sha256sum SOURCE_SUM_PRG=sha256sum
SOURCE_FORMAT=tar.gz SOURCE_FORMAT=tar.gz

View file

@ -3,7 +3,7 @@
# You need to copy an rename this file to 'db.inc.php' and complete the values # You need to copy an rename this file to 'db.inc.php' and complete the values
$conf = [ $conf = [
# The type can be 'pgsql' or 'mysql' # The type can be 'pgsql' or 'mysql'
'type' => 'mysql', 'type' => 'pgsql',
# The database username # The database username
'username' => '__DB_USER__', 'username' => '__DB_USER__',
# The password # The password
@ -11,7 +11,7 @@ $conf = [
# Where can we find the database ? # Where can we find the database ?
'host' => 'localhost', 'host' => 'localhost',
# The port number, 3306 for MySQL and 5432 for PostGreSQL # The port number, 3306 for MySQL and 5432 for PostGreSQL
'port' => 3306, 'port' => 5432,
# The database name # The database name
'database' => '__DB_NAME__' 'database' => '__DB_NAME__'
]; ];

View file

@ -393,3 +393,5 @@ catch_workers_output = yes
php_admin_value[open_basedir] = none php_admin_value[open_basedir] = none
php_admin_value[date.timezone] = "YHTZ" php_admin_value[date.timezone] = "YHTZ"
extension=pdo_pgsql.so

View file

@ -1,13 +1,13 @@
[Unit] [Unit]
Description=Movim daemon (__APP__) Description=Movim daemon (__APP__)
After=nginx.service network.target local-fs.target mysql.service After=nginx.service network.target local-fs.target postgresql.service
[Service] [Service]
Type=simple Type=simple
User=__APP__ User=__APP__
Group=__APP__ Group=__APP__
WorkingDirectory=__FINALPATH__/ WorkingDirectory=__FINALPATH__/
ExecStart=/usr/bin/php daemon.php start --url=https://YHURL --port=YHPORT ExecStart=/usr/bin/php daemon.php start --url=https://__URL__ --port=__PORT__
StandardOutput=syslog StandardOutput=syslog
SyslogIdentifier=__APP__ SyslogIdentifier=__APP__

View file

@ -5,7 +5,7 @@
"description": { "description": {
"en": "The Kickass Social Network" "en": "The Kickass Social Network"
}, },
"version": "0.13.0~ynh2", "version": "0.14.1~ynh1",
"requirements": { "requirements": {
"yunohost": ">= 3.4.0" "yunohost": ">= 3.4.0"
}, },
@ -23,7 +23,7 @@
"services": [ "services": [
"nginx", "nginx",
"php-fpm", "php-fpm",
"mysql", "postgresql",
"metronome" "metronome"
], ],
"multi_instance": false, "multi_instance": false,

View file

@ -83,16 +83,25 @@ ynh_app_setting_set "$app" port "$port"
#================================================= #=================================================
# Install packages # Install packages
ynh_install_app_dependencies php-gd php-curl php-imagick php-cli php-zmq ynh_install_app_dependencies php-curl php-cli php-mbstring php-pgsql php-xml \
postgresql
#================================================= #=================================================
# CREATE A MYSQL DATABASE # CREATE A PostgreSQL DATABASE
#================================================= #=================================================
ynh_psql_test_if_first_run
db_name=$(ynh_sanitize_dbid "$app") db_name=$(ynh_sanitize_dbid "$app")
db_user=$db_name db_user=$db_name
db_pwd=$(ynh_string_random)
ynh_app_setting_set "$app" db_name "$db_name" ynh_app_setting_set "$app" db_name "$db_name"
ynh_mysql_setup_db "$db_user" "$db_name" ynh_app_setting_set "$app" psqlpwd "$db_pwd"
# Initialize database and store postgres password for upgrade
ynh_psql_create_db "$db_name" "$db_user" "$db_pwd"
systemctl reload postgresql
#================================================= #=================================================
# DOWNLOAD, CHECK AND UNPACK SOURCE # DOWNLOAD, CHECK AND UNPACK SOURCE
@ -148,8 +157,8 @@ ynh_replace_string "'/ws/'" "'${path_url%/}/ws/'" \
( (
cd "$final_path" cd "$final_path"
curl -sS https://getcomposer.org/installer | php -- --install-dir="$final_path" \ curl -sS https://getcomposer.org/installer | php -- --install-dir="$final_path" \
&& php composer.phar config --global discard-changes true --quiet \ && php composer.phar config --global discard-changes true --verbose \
&& php composer.phar install --no-interaction --quiet && php composer.phar install --no-interaction --verbose
) )
#================================================= #=================================================
@ -157,8 +166,8 @@ ynh_replace_string "'/ws/'" "'${path_url%/}/ws/'" \
#================================================= #=================================================
# Create a dedicated systemd config # Create a dedicated systemd config
ynh_replace_string "__URL__" "${domain}${path_url}" ../conf/systemd.service ynh_replace_string "__URL__" "${domain}" ../conf/systemd.service
ynh_replace_string "__PORT__" "${port}" ../conf/systemd.service ynh_replace_string "__PORT__" "${port}" ../conf/systemd.service
ynh_add_systemd_config ynh_add_systemd_config
#================================================= #=================================================
@ -167,10 +176,13 @@ ynh_add_systemd_config
( (
cd "$final_path" cd "$final_path"
php mud.php db --set find | grep "phinx"
php mud.php config --loglevel=1 \ find | grep "daemon.php"
--locale="$language" --timezone="$timezone" \ php vendor/bin/phinx migrate
--username="$admin" --password="$password" php daemon.php config --username="$admin" --password="$password"
# php mud.php db --set
# php mud.php config --loglevel=1 \
# --locale="$language" --timezone="$timezone"
) )
#================================================= #=================================================
@ -192,7 +204,7 @@ chmod 400 "${final_path}/config/db.inc.php"
# SSOwat configuration # SSOwat configuration
if [[ "$ssoenabled" -eq 0 ]]; then if [[ "$ssoenabled" -eq 0 ]]; then
ynh_app_setting_set "$app" skipped_uris "/" ynh_app_setting_set "$app" skipped_uris "/"
(cd "$final_path" && php mud.php config --xmppwhitelist="$domain") #(cd "$final_path" && php mud.php config --xmppwhitelist="$domain")
undo_sso_patch undo_sso_patch
else else
ynh_app_setting_set "$app" unprotected_uris "/" ynh_app_setting_set "$app" unprotected_uris "/"

View file

@ -54,7 +54,7 @@ ynh_remove_app_dependencies
# REMOVE THE MYSQL DATABASE # REMOVE THE MYSQL DATABASE
#================================================= #=================================================
ynh_mysql_remove_db "$db_user" "$db_name" ynh_psql_remove_db "$db_user" "$db_name"
#================================================= #=================================================
# REMOVE APP MAIN DIR # REMOVE APP MAIN DIR

View file

@ -82,7 +82,8 @@ path_url=$(ynh_normalize_url_path $path_url)
# UPGRADE DEPENDENCIES # UPGRADE DEPENDENCIES
#================================================= #=================================================
ynh_install_app_dependencies php-gd php-curl php-imagick php-cli php-zmq ynh_install_app_dependencies php-curl php-cli php-mbstring php-pgsql php-xml \
postgresql
#================================================= #=================================================
# DOWNLOAD, CHECK AND UNPACK SOURCE # DOWNLOAD, CHECK AND UNPACK SOURCE
@ -141,7 +142,7 @@ chmod 400 "${final_path}/config/db.inc.php"
( (
cd "$final_path" cd "$final_path"
php mud.php db --set php vendor/bin/phinx migrate
) )
#================================================= #=================================================
@ -170,7 +171,7 @@ fi
# SSOwat configuration # SSOwat configuration
if [[ "$ssoenabled" = "No" ]]; then if [[ "$ssoenabled" = "No" ]]; then
ynh_app_setting_set "$app" skipped_uris "/" ynh_app_setting_set "$app" skipped_uris "/"
(cd "$final_path" && php mud.php config --xmppwhitelist="$domain") #(cd "$final_path" && php mud.php config --xmppwhitelist="$domain")
yunohost app ssowatconf yunohost app ssowatconf
undo_sso_patch undo_sso_patch
else else