mirror of
https://github.com/YunoHost-Apps/monica_ynh.git
synced 2024-09-03 19:46:23 +02:00
Fix: Android app work and updated to version 2.8.1 (#27)
* Genrate key for android app * misnamed file name * Replace and wrong variable * Replace and wrong variable * start php7.1 start * start php7.1 before reload * wrong commenting syntex in php.conf * Updated to version 2.8.1 * Run php artisan passport:install for the app config * Added domain .env
This commit is contained in:
parent
990cf764d2
commit
3eaf8b61a8
8 changed files with 41 additions and 14 deletions
|
@ -4,7 +4,7 @@
|
|||
|
||||
[![Installer Monica with YunoHost](https://install-app.yunohost.org/install-with-yunohost.png)](https://install-app.yunohost.org/?app=monica)
|
||||
|
||||
Shipped version: **2.8.0**
|
||||
Shipped version: **2.8.1**
|
||||
<p align="center"><img src="37693034-5783b3d6-2c93-11e8-80ea-bd78438dcd51.png"></p>
|
||||
<h1 align="center">Personal Relationship Manager</h1>
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@ HASH_SALT=ChangeMeBy20+KeyLength
|
|||
HASH_LENGTH=18
|
||||
|
||||
# The URL of your application.
|
||||
APP_URL=http://localhost
|
||||
APP_URL=https://__DOMAIN__
|
||||
|
||||
# Database information
|
||||
# To keep this information secure, we urge you to change the default password
|
||||
|
@ -114,8 +114,8 @@ MFA_ENABLED=false
|
|||
# CLIENT ID and SECRET used for the official mobile application
|
||||
# This is to make sure that only the mobile application that you approve can
|
||||
# access the route to let your users sign in with their credentials
|
||||
MOBILE_CLIENT_ID=
|
||||
MOBILE_CLIENT_SECRET=
|
||||
MOBILE_CLIENT_ID=__IDENTITY__
|
||||
MOBILE_CLIENT_SECRET=__KEY__
|
||||
|
||||
# Allow to access general statistics about your instance through a public API
|
||||
# call
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
SOURCE_URL=https://github.com/monicahq/monica/archive/v2.8.0.zip
|
||||
SOURCE_SUM=72670426bf3ffd64827d0d0fce32469fc895b800580d1c81f0213e52b468e1c6
|
||||
SOURCE_URL=https://github.com/monicahq/monica/archive/v2.8.1.zip
|
||||
SOURCE_SUM=130d886412483e2a80703fde42b09181d572ca355ce1144c5bf7db8fa9010cb0
|
||||
SOURCE_SUM_PRG=sha256sum
|
||||
SOURCE_FORMAT=zip
|
||||
SOURCE_IN_SUBDIR=true
|
||||
|
|
|
@ -249,12 +249,12 @@ catch_workers_output = yes
|
|||
;php_value[memory_limit] = 256M
|
||||
;php_value[short_open_tag] = On
|
||||
|
||||
# Common values to change to increase file upload limit
|
||||
; Common values to change to increase file upload limit
|
||||
; upload_max_filesize = 50M
|
||||
; post_max_size = 50M
|
||||
; mail.add_x_header = Off
|
||||
|
||||
# Other common parameters
|
||||
; Other common parameters
|
||||
; max_execution_time = 600
|
||||
; max_input_time = 300
|
||||
; memory_limit = 256M
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
},
|
||||
"url": "https://monica.com",
|
||||
"license": "GPL-3.0",
|
||||
"version": "2.8.0",
|
||||
"version": "2.8.1",
|
||||
"maintainer": {
|
||||
"name": "Sebastian Gumprich",
|
||||
"email": "yunohost@gumpri.ch",
|
||||
|
|
|
@ -109,7 +109,7 @@ ynh_install_php7 () {
|
|||
echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" | sudo tee /etc/apt/sources.list.d/php7.list
|
||||
|
||||
ynh_package_update
|
||||
ynh_install_app_dependencies php7.1 php7.1-zip php7.1-fpm php7.1-mysql php7.1-xml php7.1-intl php7.1-mbstring php7.1-gd php7.1-curl php7.1-bcmath
|
||||
ynh_install_app_dependencies php7.1 php7.1-cli php7.1-common php7.1-json php7.1-opcache php7.1-mysql php7.1-mbstring php7.1-mcrypt php7.1-zip php7.1-fpm php7.1-bcmath php7.1-intl php7.1-simplexml php7.1-dom php7.1-curl php7.1-gd
|
||||
sudo update-alternatives --install /usr/bin/php php /usr/bin/php5 70
|
||||
}
|
||||
|
||||
|
|
|
@ -123,7 +123,7 @@ email=$(ynh_user_get_info $admin 'mail')
|
|||
sudo cp ../conf/.env $final_path/.env
|
||||
|
||||
db_name=$(ynh_sanitize_dbid $app)
|
||||
|
||||
ynh_replace_string "__DOMAIN__" "$domain" "$final_path/.env"
|
||||
ynh_replace_string "random_key" "$random_key" "$final_path/.env"
|
||||
ynh_replace_string "yunouser" "$db_name" "$final_path/.env"
|
||||
ynh_replace_string "yunopass" "$db_pwd" "$final_path/.env"
|
||||
|
@ -134,7 +134,17 @@ ynh_replace_string "language" "$language" "$final_path/.env"
|
|||
|
||||
|
||||
# setup application config
|
||||
cd $final_path && sudo /usr/bin/php7.1 artisan monica:update --force
|
||||
( cd $final_path && sudo /usr/bin/php7.1 artisan monica:update --force )
|
||||
( cd $final_path && sudo /usr/bin/php7.1 artisan passport:install )
|
||||
( cd $final_path && sudo /usr/bin/php7.1 artisan passport:client --password -n > key.txt )
|
||||
mobile_id=$( cd $final_path && tail -2 key.txt | head -1 | cut -c 12- )
|
||||
mobile_key=$( cd $final_path && tail -1 key.txt | cut -c 16- )
|
||||
ynh_replace_string "__IDENTITY__" "$mobile_id" "$final_path/.env"
|
||||
ynh_replace_string "__KEY__" "$mobile_key" "$final_path/.env"
|
||||
ynh_app_setting_set $app mobile_id $mobile_id
|
||||
ynh_app_setting_set $app mobile_key $mobile_key
|
||||
(cd $final_path && rm -f key.txt)
|
||||
|
||||
|
||||
# create a cronjob to run the scheduler
|
||||
echo "* * * * * -u $app /usr/bin/php7.1 $final_path/artisan schedule:run" > /tmp/cron$app
|
||||
|
@ -174,6 +184,7 @@ fi
|
|||
#=================================================
|
||||
# RELOAD NGINX
|
||||
#=================================================
|
||||
service php7.1-fpm start
|
||||
systemctl reload php7.1-fpm
|
||||
systemctl reload nginx
|
||||
# Set default php to php5 or php7.0
|
||||
|
|
|
@ -24,7 +24,6 @@ db_name=$(ynh_app_setting_get $app db_name)
|
|||
db_pwd=$(ynh_app_setting_get $app mysqlpwd)
|
||||
language=$(ynh_app_setting_get $app language)
|
||||
random_key=$(ynh_app_setting_get $app random_key)
|
||||
|
||||
#=================================================
|
||||
# ENSURE DOWNWARD COMPATIBILITY
|
||||
#=================================================
|
||||
|
@ -95,7 +94,7 @@ ynh_system_user_create $app
|
|||
#=================================================
|
||||
|
||||
# install new dependencies
|
||||
ynh_install_app_dependencies php7.1 php7.1-zip php7.1-fpm php7.1-mysql php7.1-xml php7.1-intl php7.1-mbstring php7.1-gd php7.1-curl php7.1-bcmath
|
||||
ynh_install_app_dependencies php7.1 php7.1-cli php7.1-common php7.1-json php7.1-opcache php7.1-mysql php7.1-mbstring php7.1-mcrypt php7.1-zip php7.1-fpm php7.1-bcmath php7.1-intl php7.1-simplexml php7.1-dom php7.1-curl php7.1-gd
|
||||
|
||||
#=================================================
|
||||
# PHP-FPM 7.1 CONFIGURATION
|
||||
|
@ -118,11 +117,28 @@ ynh_replace_string "yunobase" "$db_name" "$final_path/.env"
|
|||
ynh_replace_string "yunomail" "$email" "$final_path/.env"
|
||||
ynh_replace_string "yunodomain" "$domain" "$final_path/.env"
|
||||
ynh_replace_string "language" "$language" "$final_path/.env"
|
||||
ynh_replace_string "__DOMAIN__" "$domain" "$final_path/.env"
|
||||
|
||||
|
||||
# Run monica update
|
||||
cd $final_path && sudo /usr/bin/php7.1 artisan monica:update --force
|
||||
|
||||
if [ -f $final_path/storage/oauth-private.key ]; then
|
||||
mobile_id=$(ynh_app_setting_get $app mobile_id)
|
||||
mobile_key=$(ynh_app_setting_get $app mobile_key)
|
||||
ynh_replace_string "__IDENTITY__" "$mobile_id" "$final_path/.env"
|
||||
ynh_replace_string "__KEY__" "$mobile_key" "$final_path/.env"
|
||||
else
|
||||
( cd $final_path && sudo /usr/bin/php7.1 artisan passport:install )
|
||||
( cd $final_path && sudo /usr/bin/php7.1 artisan passport:client --password -n > key.txt )
|
||||
mobile_id=$( cd $final_path && tail -2 key.txt | head -1 | cut -c 12- )
|
||||
mobile_key=$( cd $final_path && tail -1 key.txt | cut -c 16- )
|
||||
ynh_replace_string "__IDENTITY__" "$mobile_id" "$final_path/.env"
|
||||
ynh_replace_string "__KEY__" "$mobile_key" "$final_path/.env"
|
||||
ynh_app_setting_set $app mobile_id $mobile_id
|
||||
ynh_app_setting_set $app mobile_key $mobile_key
|
||||
(cd $final_path && rm -f key.txt)
|
||||
fi
|
||||
#=================================================
|
||||
# GENERIC FINALIZATION
|
||||
#=================================================
|
||||
|
|
Loading…
Reference in a new issue