mirror of
https://github.com/YunoHost-Apps/cryptpad_ynh.git
synced 2024-09-03 18:26:14 +02:00
cleaning
This commit is contained in:
parent
5d014c575a
commit
d0b1baa31a
4 changed files with 14 additions and 24 deletions
|
@ -15,7 +15,6 @@
|
|||
upgrade=1 from_commit=ddbb3b36b8bcd00e573456bd9ad07b1aa5e41cb1
|
||||
backup_restore=1
|
||||
multi_instance=0
|
||||
incorrect_path=0
|
||||
port_already_use=1
|
||||
change_url=1
|
||||
;;; Options
|
||||
|
|
|
@ -142,7 +142,7 @@ module.exports = {
|
|||
/* CryptPad will display a point of contact for your instance on its contact page
|
||||
* (/contact.html) if you provide it below.
|
||||
*/
|
||||
adminEmail: '__ADMIN_MAIL__',
|
||||
adminEmail: '__EMAIL__',
|
||||
|
||||
/*
|
||||
* By default, CryptPad contacts one of our servers once a day.
|
||||
|
|
|
@ -49,8 +49,6 @@ ynh_app_setting_set --app=$app --key=domain --value=$domain
|
|||
ynh_app_setting_set --app=$app --key=path_url --value=$path_url
|
||||
ynh_app_setting_set --app=$app --key=admin --value=$admin
|
||||
|
||||
email=$(ynh_user_get_info --username=$admin --key=mail)
|
||||
|
||||
#=================================================
|
||||
# STANDARD MODIFICATIONS
|
||||
#=================================================
|
||||
|
@ -116,9 +114,11 @@ ynh_add_systemd_config
|
|||
# Copy default configuration file
|
||||
mv "../conf/config.js" "$final_path/config/config.js"
|
||||
|
||||
email=$(ynh_user_get_info --username=$admin --key=mail)
|
||||
|
||||
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"
|
||||
ynh_replace_string --match_string="__EMAIL__" --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"
|
||||
|
@ -155,7 +155,7 @@ yunohost service add $app --description="Zero Knowledge realtime collaborative e
|
|||
ynh_script_progression --message="Starting a systemd service..." --weight=2
|
||||
|
||||
# Start a systemd service
|
||||
ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" --line_match="server available"
|
||||
ynh_systemd_action --service_name=$app --action=start --log_path=systemd --line_match="server available"
|
||||
|
||||
#=================================================
|
||||
# SETUP SSOWAT
|
||||
|
|
|
@ -35,15 +35,6 @@ upgrade_type=$(ynh_check_app_version_changed)
|
|||
#=================================================
|
||||
ynh_script_progression --message="Ensuring downward compatibility..." --weight=2
|
||||
|
||||
# Fix is_public as a boolean value
|
||||
if [ "$is_public" = "Yes" ]; then
|
||||
ynh_app_setting_set --app=$app --key=is_public --value=1
|
||||
is_public=1
|
||||
elif [ "$is_public" = "No" ]; then
|
||||
ynh_app_setting_set --app=$app --key=is_public --value=0
|
||||
is_public=0
|
||||
fi
|
||||
|
||||
# If final_path doesn't exist, create it
|
||||
if [ -z "$final_path" ]; then
|
||||
final_path=/var/www/$app
|
||||
|
@ -127,7 +118,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="$email" --target_file="$final_path/config/config.js"
|
||||
ynh_replace_string --match_string="__EMAIL__" --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"
|
||||
|
|
Loading…
Add table
Reference in a new issue