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_SUM=7aa5b2b6cd97e87a440981cfb6788a6f04ffd5eb4545026c49e1c61771593d11
SOURCE_URL=https://github.com/movim/movim/archive/0.14.1.tar.gz
SOURCE_SUM=aa764569952fab61e681a54a03825308188931fa478783b32b58fb15a083292c
SOURCE_SUM_PRG=sha256sum
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
$conf = [
# The type can be 'pgsql' or 'mysql'
'type' => 'mysql',
'type' => 'pgsql',
# The database username
'username' => '__DB_USER__',
# The password
@ -11,7 +11,7 @@ $conf = [
# Where can we find the database ?
'host' => 'localhost',
# The port number, 3306 for MySQL and 5432 for PostGreSQL
'port' => 3306,
'port' => 5432,
# The database name
'database' => '__DB_NAME__'
];

View file

@ -392,4 +392,6 @@ catch_workers_output = yes
;php_admin_value[memory_limit] = 32M
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]
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]
Type=simple
User=__APP__
Group=__APP__
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
SyslogIdentifier=__APP__

View file

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

View file

@ -83,16 +83,25 @@ ynh_app_setting_set "$app" port "$port"
#=================================================
# 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_user=$db_name
db_pwd=$(ynh_string_random)
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
@ -148,8 +157,8 @@ ynh_replace_string "'/ws/'" "'${path_url%/}/ws/'" \
(
cd "$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 install --no-interaction --quiet
&& php composer.phar config --global discard-changes true --verbose \
&& php composer.phar install --no-interaction --verbose
)
#=================================================
@ -157,8 +166,8 @@ ynh_replace_string "'/ws/'" "'${path_url%/}/ws/'" \
#=================================================
# Create a dedicated systemd config
ynh_replace_string "__URL__" "${domain}${path_url}" ../conf/systemd.service
ynh_replace_string "__PORT__" "${port}" ../conf/systemd.service
ynh_replace_string "__URL__" "${domain}" ../conf/systemd.service
ynh_replace_string "__PORT__" "${port}" ../conf/systemd.service
ynh_add_systemd_config
#=================================================
@ -167,10 +176,13 @@ ynh_add_systemd_config
(
cd "$final_path"
php mud.php db --set
php mud.php config --loglevel=1 \
--locale="$language" --timezone="$timezone" \
--username="$admin" --password="$password"
find | grep "phinx"
find | grep "daemon.php"
php vendor/bin/phinx migrate
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
if [[ "$ssoenabled" -eq 0 ]]; then
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
else
ynh_app_setting_set "$app" unprotected_uris "/"

View file

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

View file

@ -82,7 +82,8 @@ path_url=$(ynh_normalize_url_path $path_url)
# 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
@ -141,7 +142,7 @@ chmod 400 "${final_path}/config/db.inc.php"
(
cd "$final_path"
php mud.php db --set
php vendor/bin/phinx migrate
)
#=================================================
@ -170,7 +171,7 @@ fi
# SSOwat configuration
if [[ "$ssoenabled" = "No" ]]; then
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
undo_sso_patch
else