mirror of
https://github.com/YunoHost-Apps/conduit_ynh.git
synced 2024-09-03 18:16:30 +02:00
commit
42df13e377
6 changed files with 14 additions and 17 deletions
|
@ -20,8 +20,11 @@ fund = "https://liberapay.com/timokoesters/"
|
||||||
yunohost = ">= 11.2"
|
yunohost = ">= 11.2"
|
||||||
architectures = ["arm64", "amd64", "armhf"]
|
architectures = ["arm64", "amd64", "armhf"]
|
||||||
multi_instance = false
|
multi_instance = false
|
||||||
|
|
||||||
ldap = "not_relevant"
|
ldap = "not_relevant"
|
||||||
|
|
||||||
sso = "not_relevant"
|
sso = "not_relevant"
|
||||||
|
|
||||||
disk = "50M"
|
disk = "50M"
|
||||||
ram.build = "50M"
|
ram.build = "50M"
|
||||||
ram.runtime = "50M"
|
ram.runtime = "50M"
|
||||||
|
|
|
@ -6,7 +6,6 @@
|
||||||
# IMPORT GENERIC HELPERS
|
# IMPORT GENERIC HELPERS
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
# Keep this path for calling _common.sh inside the execution's context of backup and restore scripts
|
|
||||||
source ../settings/scripts/_common.sh
|
source ../settings/scripts/_common.sh
|
||||||
source /usr/share/yunohost/helpers
|
source /usr/share/yunohost/helpers
|
||||||
|
|
||||||
|
|
|
@ -28,27 +28,26 @@ ynh_app_setting_set --app=$app --key=federation --value=$federation
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Setting up source files..." --weight=1
|
ynh_script_progression --message="Setting up source files..." --weight=1
|
||||||
|
|
||||||
# Download, check integrity, uncompress and patch the source from app.src
|
|
||||||
ynh_setup_source --dest_dir="$install_dir"
|
ynh_setup_source --dest_dir="$install_dir"
|
||||||
|
|
||||||
chmod -R o-rwx "$install_dir"
|
chmod -R o-rwx "$install_dir"
|
||||||
chown -R $app:root "$install_dir"
|
chown -R $app:root "$install_dir"
|
||||||
chmod +x -R "$install_dir/conduit"
|
chmod +x "$install_dir/conduit"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# SYSTEM CONFIGURATION
|
# 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=1
|
||||||
|
|
||||||
# Create a dedicated NGINX config using the conf/nginx.conf template
|
|
||||||
ynh_add_nginx_config
|
|
||||||
|
|
||||||
# Create .well-known redirection for access by federation
|
# Create .well-known redirection for access by federation
|
||||||
if yunohost --output-as plain domain list | grep -q "^$server_name$"
|
if yunohost --output-as plain domain list | grep -q "^$server_name$"
|
||||||
then
|
then
|
||||||
ynh_add_config --template="server_name.conf" --destination="/etc/nginx/conf.d/${server_name}.d/${app}_server_name.conf"
|
ynh_add_config --template="server_name.conf" --destination="/etc/nginx/conf.d/${server_name}.d/${app}_server_name.conf"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Create a dedicated NGINX config using the conf/nginx.conf template
|
||||||
|
ynh_add_nginx_config
|
||||||
|
|
||||||
# Create a dedicated systemd config
|
# Create a dedicated systemd config
|
||||||
ynh_add_systemd_config
|
ynh_add_systemd_config
|
||||||
|
|
||||||
|
@ -61,7 +60,7 @@ yunohost service add $app --description="Chat server powered by Matrix" --log="/
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Adding a configuration file..." --weight=1
|
ynh_script_progression --message="Adding a configuration file..." --weight=1
|
||||||
|
|
||||||
ynh_add_config --template="../conf/conduit.toml" --destination="$install_dir/conduit.toml"
|
ynh_add_config --template="conduit.toml" --destination="$install_dir/conduit.toml"
|
||||||
|
|
||||||
chmod 400 "$install_dir/conduit.toml"
|
chmod 400 "$install_dir/conduit.toml"
|
||||||
chown $app:root "$install_dir/conduit.toml"
|
chown $app:root "$install_dir/conduit.toml"
|
||||||
|
|
|
@ -16,8 +16,6 @@ source /usr/share/yunohost/helpers
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Removing system configurations related to $app..." --weight=1
|
ynh_script_progression --message="Removing system configurations related to $app..." --weight=1
|
||||||
|
|
||||||
# This should be a symetric version of what happens in the install script
|
|
||||||
|
|
||||||
# Remove the service from the list of services known by YunoHost (added from `yunohost service add`)
|
# Remove the service from the list of services known by YunoHost (added from `yunohost service add`)
|
||||||
if ynh_exec_warn_less yunohost service status $app >/dev/null
|
if ynh_exec_warn_less yunohost service status $app >/dev/null
|
||||||
then
|
then
|
||||||
|
|
|
@ -43,7 +43,6 @@ yunohost service add $app --description="Chat server powered by Matrix" --log="/
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Reloading NGINX web server and $app's service..." --weight=1
|
ynh_script_progression --message="Reloading NGINX web server and $app's service..." --weight=1
|
||||||
|
|
||||||
# Typically you only have either $app or php-fpm but not both at the same time...
|
|
||||||
ynh_systemd_action --service_name=$app --action="start" --log_path="systemd"
|
ynh_systemd_action --service_name=$app --action="start" --log_path="systemd"
|
||||||
|
|
||||||
ynh_systemd_action --service_name=nginx --action=reload
|
ynh_systemd_action --service_name=nginx --action=reload
|
||||||
|
|
|
@ -28,12 +28,11 @@ if [ "$upgrade_type" == "UPGRADE_APP" ]
|
||||||
then
|
then
|
||||||
ynh_script_progression --message="Upgrading source files..." --weight=1
|
ynh_script_progression --message="Upgrading source files..." --weight=1
|
||||||
|
|
||||||
# Download, check integrity, uncompress and patch the source from app.src
|
ynh_setup_source --dest_dir="$install_dir" --keep="conduit.toml"
|
||||||
ynh_setup_source --dest_dir="$install_dir"
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
chown -R $app:root "$install_dir"
|
chown -R $app:root "$install_dir"
|
||||||
chmod +x -R "$install_dir/conduit"
|
chmod +x "$install_dir/conduit"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# REAPPLY SYSTEM CONFIGURATIONS
|
# REAPPLY SYSTEM CONFIGURATIONS
|
||||||
|
@ -57,12 +56,12 @@ yunohost service add $app --description="Chat server powered by Matrix" --log="/
|
||||||
#=================================================
|
#=================================================
|
||||||
# UPDATE A CONFIG FILE
|
# UPDATE A CONFIG FILE
|
||||||
#=================================================
|
#=================================================
|
||||||
#ynh_script_progression --message="Updating a configuration file..." --weight=1
|
ynh_script_progression --message="Updating a configuration file..." --weight=1
|
||||||
|
|
||||||
#ynh_add_config --template="../conf/conduit.toml" --destination="$install_dir/conduit.toml"
|
ynh_add_config --template="conduit.toml" --destination="$install_dir/conduit.toml"
|
||||||
|
|
||||||
#chmod 400 "$install_dir/conduit.toml"
|
chmod 400 "$install_dir/conduit.toml"
|
||||||
#chown $app:$app "$install_dir/conduit.toml"
|
chown $app:$app "$install_dir/conduit.toml"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# START SYSTEMD SERVICE
|
# START SYSTEMD SERVICE
|
||||||
|
|
Loading…
Add table
Reference in a new issue