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

Update upgrade

This commit is contained in:
ericgaspar 2022-05-09 17:11:40 +02:00
parent 5dc6ed8636
commit 4a6b5c3d35
No known key found for this signature in database
GPG key ID: 574F281483054D44

View file

@ -162,16 +162,16 @@ popd
if [ -f $final_path/storage/oauth-private.key ]; then
mobile_id=$(ynh_app_setting_get --app=$app --key=mobile_id)
mobile_key=$(ynh_app_setting_get --app=$app --key=mobile_key)
ynh_replace_string --match_string="__MOBILE_ID__" --replace_string="$mobile_id" --target_file="$config"
ynh_replace_string --match_string="__MOBILE_KEY__" --replace_string="$mobile_key" --target_file="$config"
ynh_replace_string --match_string="MOBILE_ID" --replace_string="$mobile_id" --target_file="$config"
ynh_replace_string --match_string="MOBILE_KEY" --replace_string="$mobile_key" --target_file="$config"
else
pushd "$final_path"
ynh_exec_warn_less ynh_exec_as $app php$phpversion artisan passport:keys
ynh_exec_warn_less ynh_exec_as $app php$phpversion artisan passport:client --password -n > key.txt
mobile_id=$( tail -2 key.txt | head -1 | cut -c 12- )
mobile_key=$( tail -1 key.txt | cut -c 16- )
ynh_replace_string --match_string="__MOBILE_ID__" --replace_string="$mobile_id" --target_file="$config"
ynh_replace_string --match_string="__MOBILE_KEY__" --replace_string="$mobile_key" --target_file="$config"
ynh_replace_string --match_string="MOBILE_ID" --replace_string="$mobile_id" --target_file="$config"
ynh_replace_string --match_string="MOBILE_KEY" --replace_string="$mobile_key" --target_file="$config"
ynh_app_setting_set --app=$app --key=mobile_id --value=$mobile_id
ynh_app_setting_set --app=$app --key=mobile_key --value=$mobile_key
ynh_secure_remove --file="$final_path/key.txt"