1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/cryptpad_ynh.git synced 2024-09-03 18:26:14 +02:00

Add getops

This commit is contained in:
ericgaspar 2021-01-24 11:54:11 +01:00
parent e6580b4e17
commit ce50f29021
No known key found for this signature in database
GPG key ID: 574F281483054D44
2 changed files with 6 additions and 6 deletions

View file

@ -50,7 +50,7 @@ ynh_app_setting_set --app=$app --key=is_public --value=$is_public
ynh_app_setting_set --app=$app --key=path_url --value=$path_url
ynh_app_setting_set --app=$app --key=admin --value=$admin
admin_mail=$(ynh_user_get_info "$admin" "mail")
email=$(ynh_user_get_info --username=$admin --key=mail)
#=================================================
# STANDARD MODIFICATIONS
@ -124,7 +124,7 @@ mv "../conf/config.js" "$final_path/config/config.js"
ynh_replace_string --match_string="__PORT__" --replace_string="$port" --target_file="$final_path/config/config.js"
ynh_replace_string --match_string="__PORTI__" --replace_string="$porti" --target_file="$final_path/config/config.js"
ynh_replace_string --match_string="__ADMIN_MAIL__" --replace_string="$admin_mail" --target_file="$final_path/config/config.js"
ynh_replace_string --match_string="__ADMIN_MAIL__" --replace_string="$email" --target_file="$final_path/config/config.js"
# Store file checksum to detected user modifications on upgrade
ynh_store_file_checksum "$final_path/config/config.js"

View file

@ -21,7 +21,7 @@ path_url=$(ynh_app_setting_get --app=$app --key=path_url)
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
is_public=$(ynh_app_setting_get --app=$app --key=is_public)
admin=$(ynh_app_setting_get --app=$app --key=admin)
admin_mail=$(ynh_user_get_info "$admin" "mail")
email=$(ynh_user_get_info --username=$admin --key=mail)
port=$(ynh_app_setting_get --app=$app --key=port)
porti=$(ynh_app_setting_get --app=$app --key=porti)
@ -122,9 +122,9 @@ ynh_backup_if_checksum_is_different "$final_path/config/config.js"
# Copy default configuration file
mv "../conf/config.js" "$final_path/config/config.js"
ynh_replace_string --match_string="__PORT__" --replace_string="$port" --target_file="$final_path/config/config.js"
ynh_replace_string --match_string="__PORTI__" --replace_string="$porti" --target_file="$final_path/config/config.js"
ynh_replace_string --match_string="__ADMIN_MAIL__" --replace_string="$admin_mail" --target_file="$final_path/config/config.js"
ynh_replace_string --match_string="__PORT__" --replace_string="$port" --target_file="$final_path/config/config.js"
ynh_replace_string --match_string="__PORTI__" --replace_string="$porti" --target_file="$final_path/config/config.js"
ynh_replace_string --match_string="__ADMIN_MAIL__" --replace_string="$email" --target_file="$final_path/config/config.js"
# Store file checksum to detected user modifications on upgrade
ynh_store_file_checksum "$final_path/config/config.js"