mirror of
https://github.com/YunoHost-Apps/simplex_ynh.git
synced 2024-09-03 20:26:28 +02:00
fix
This commit is contained in:
parent
796b41d2a4
commit
62ff8b214d
4 changed files with 15 additions and 9 deletions
|
@ -21,6 +21,8 @@ ynh_print_info --message="Declaring files to be backed up..."
|
|||
|
||||
ynh_backup --src_path="$install_dir"
|
||||
|
||||
ynh_backup --src_path="/etc/opt/simplex"
|
||||
|
||||
#=================================================
|
||||
# BACKUP SYSTEMD
|
||||
#=================================================
|
||||
|
|
|
@ -39,7 +39,7 @@ chown -R $app:$app "/etc/opt/simplex"
|
|||
#=================================================
|
||||
# SYSTEM CONFIGURATION
|
||||
#=================================================
|
||||
ynh_script_progression --message="Adding system configurations related to $app ..." --weight=1
|
||||
ynh_script_progression --message="Adding system configurations related to $app ..." --weight=6
|
||||
|
||||
# Create a dedicated systemd config
|
||||
ynh_add_systemd_config
|
||||
|
|
|
@ -21,18 +21,18 @@ chmod -R o-rwx "$install_dir"
|
|||
chown -R $app:www-data "$install_dir"
|
||||
|
||||
#=================================================
|
||||
# RESTORE SYSTEMD
|
||||
# RESTORE SYSTEM CONFIGURATIONS
|
||||
#=================================================
|
||||
ynh_script_progression --message="Restoring the systemd configuration..." --weight=1
|
||||
# RESTORE THE PHP-FPM CONFIGURATION
|
||||
#=================================================
|
||||
ynh_script_progression --message="Restoring system configurations related to $app..." --weight=4
|
||||
|
||||
ynh_restore_file --origin_path="/etc/opt/simplex"
|
||||
chown -R $app:$app "/etc/opt/simplex"
|
||||
|
||||
ynh_restore_file --origin_path="/etc/systemd/system/$app.service"
|
||||
systemctl enable $app.service --quiet
|
||||
|
||||
#=================================================
|
||||
# INTEGRATE SERVICE IN YUNOHOST
|
||||
#=================================================
|
||||
ynh_script_progression --message="Integrating service in YunoHost..." --weight=1
|
||||
|
||||
yunohost service add $app --description="Messaging platform" --log="/var/log/$app/$app.log" --needs_exposed_ports="$port"
|
||||
|
||||
#=================================================
|
||||
|
|
|
@ -16,6 +16,10 @@ source /usr/share/yunohost/helpers
|
|||
upgrade_type=$(ynh_check_app_version_changed)
|
||||
|
||||
|
||||
#=================================================
|
||||
# STORE SETTINGS
|
||||
#=================================================
|
||||
|
||||
public_ip4="$(curl -s ip.yunohost.org)" || true
|
||||
fingerprint=$(cat /etc/opt/simplex/fingerprint)
|
||||
ynh_app_setting_set --app=$app --key=public_ip4 --value=$public_ip4
|
||||
|
@ -49,7 +53,7 @@ chmod +x $install_dir/smp-server
|
|||
#=================================================
|
||||
# REAPPLY SYSTEM CONFIGURATIONS
|
||||
#=================================================
|
||||
ynh_script_progression --message="Upgrading system configurations related to $app..." --weight=1
|
||||
ynh_script_progression --message="Upgrading system configurations related to $app..." --weight=4
|
||||
|
||||
# Create a dedicated systemd config
|
||||
ynh_add_systemd_config
|
||||
|
|
Loading…
Add table
Reference in a new issue