1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/simplex_ynh.git synced 2024-09-03 20:26:28 +02:00
This commit is contained in:
Éric Gaspar 2024-09-02 21:07:39 +02:00
parent 6d33f626c4
commit 313b4ae527
7 changed files with 2 additions and 18 deletions

View file

@ -18,7 +18,7 @@ cpe = "cpe:2.3:a:simplex:simplex_chat"
fund = "https://opencollective.com/simplex-chat"
[integration]
yunohost = ">= 11.2.18"
yunohost = ">= 11.2.29"
helpers_version = "2.1"
architectures = ["amd64", "arm64"]
multi_instance = false

View file

@ -3,5 +3,3 @@
#=================================================
# COMMON VARIABLES AND CUSTOM HELPERS
#=================================================
# PHP APP SPECIFIC
#=================================================

View file

@ -1,6 +1,5 @@
#!/bin/bash
# Keep this path for calling _common.sh inside the execution's context of backup and restore scripts
source ../settings/scripts/_common.sh
source /usr/share/yunohost/helpers

View file

@ -22,8 +22,6 @@ ynh_setup_source --dest_dir="$install_dir" --source_id="xftp"
mkdir -p /etc/opt/simplex-xftp /etc/opt/simplex /var/opt/simplex-xftp /var/opt/simplex
chown -R $app:$app /etc/opt/simplex-xftp /etc/opt/simplex /var/opt/simplex-xftp /var/opt/simplex
#REMOVEME? Assuming the install dir is setup using ynh_setup_source, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chmod -R o-rwx "$install_dir"
#REMOVEME? Assuming the install dir is setup using ynh_setup_source, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chown -R $app:$app "$install_dir"
chmod +x $install_dir/smp-server
chmod +x $install_dir/xftp-server
@ -65,7 +63,6 @@ chown -R $app:$app "/etc/opt/simplex-xftp"
#=================================================
ynh_script_progression "Adding system configurations related to $app..."
# Create a dedicated systemd config
ynh_config_add_systemd
ynh_config_add_systemd --service=xftp --template=../conf/xftp.systemd.service
@ -77,7 +74,6 @@ yunohost service add xftp --description="Messaging platform" --log="/var/log/$ap
#=================================================
ynh_script_progression "Starting $app's systemd service..."
# Start a systemd service
ynh_systemctl --service=$app --action="start" --log_path="systemd"
ynh_systemctl --service="xftp" --action="start" --log_path="systemd"

View file

@ -18,7 +18,7 @@ fi
# Remove the dedicated systemd config
ynh_config_remove_systemd
ynh_config_remove_systemdxftp
ynh_config_remove_systemd xftp
# Remove the app directory securely
ynh_safe_rm "/etc/opt/simplex"

View file

@ -1,6 +1,5 @@
#!/bin/bash
# Keep this path for calling _common.sh inside the execution's context of backup and restore scripts
source ../settings/scripts/_common.sh
source /usr/share/yunohost/helpers
@ -11,8 +10,6 @@ ynh_script_progression "Restoring the app main directory..."
ynh_restore "$install_dir"
#REMOVEME? Assuming the install dir is setup using ynh_setup_source, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chmod -R o-rwx "$install_dir"
#REMOVEME? Assuming the install dir is setup using ynh_setup_source, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chown -R $app:www-data "$install_dir"
#=================================================
# RESTORE THE DATA DIRECTORY
#=================================================
@ -20,14 +17,11 @@ ynh_script_progression "Restoring the data directory..."
ynh_restore "$data_dir"
# (Same as for install dir)
chown -R $app:www-data "$data_dir"
#=================================================
# RESTORE SYSTEM CONFIGURATIONS
#=================================================
# RESTORE THE PHP-FPM CONFIGURATION
#=================================================
ynh_script_progression "Restoring system configurations related to $app..."
ynh_restore "/etc/opt/simplex"

View file

@ -30,8 +30,6 @@ ynh_script_progression "Upgrading source files..."
ynh_setup_source --dest_dir="$install_dir"
ynh_setup_source --dest_dir="$install_dir" --source_id="xftp"
#REMOVEME? Assuming the install dir is setup using ynh_setup_source, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chmod -R o-rwx "$install_dir"
#REMOVEME? Assuming the install dir is setup using ynh_setup_source, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chown -R $app:www-data "$install_dir"
chmod +x $install_dir/smp-server
chmod +x $install_dir/xftp-server
@ -73,7 +71,6 @@ fi
#=================================================
ynh_script_progression "Upgrading system configurations related to $app..."
# Create a dedicated systemd config
ynh_config_add_systemd
ynh_config_add_systemd --service=xftp --template=../conf/xftp.systemd.service