1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/thelounge_ynh.git synced 2024-09-03 20:35:54 +02:00
This commit is contained in:
ericgaspar 2021-03-22 09:17:49 +01:00
parent 69d7448072
commit f0eabf81c7
No known key found for this signature in database
GPG key ID: 574F281483054D44
6 changed files with 14 additions and 20 deletions

View file

@ -21,7 +21,6 @@
upgrade=1 from_commit=bd00c8e3ce43563f33fde073cf36b997c348d05c
backup_restore=1
multi_instance=0
port_already_use=0
change_url=1
;;; Options
Email=

View file

@ -23,7 +23,6 @@ ynh_print_info --message="Loading installation settings..."
app=$YNH_APP_INSTANCE_NAME
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
config_path=$(ynh_app_setting_get --app=$app --key=config_path)
domain=$(ynh_app_setting_get --app=$app --key=domain)
#=================================================
@ -53,7 +52,7 @@ ynh_backup --src_path="/etc/systemd/system/$app.service"
# BACKUP CONFIG
#=================================================
ynh_backup --src_path="$config_path"
ynh_backup --src_path="/home/yunohost.app/$app"
#=================================================
# END OF SCRIPT

View file

@ -34,7 +34,6 @@ app=$YNH_APP_INSTANCE_NAME
ynh_script_progression --message="Validating installation parameters..."
final_path=/var/www/$app
config_path=/home/yunohost.app/$app
test ! -e "$final_path" || ynh_die --message="This path already contains a folder"
# Register (book) web path
@ -45,9 +44,8 @@ ynh_webpath_register --app=$app --domain=$domain --path_url=$path_url
#=================================================
ynh_script_progression --message="Storing installation settings..."
ynh_app_setting_set --app=$app --key=domain --value=$domain
ynh_app_setting_set --app=$app --key=path --value=$path_url
ynh_app_setting_set --app=$app --key=config_path --value=$config_path
ynh_app_setting_set --app=$app --key=domain --value=$domain
ynh_app_setting_set --app=$app --key=path --value=$path_url
#=================================================
# STANDARD MODIFICATIONS
@ -103,9 +101,9 @@ ynh_add_nginx_config
#=================================================
ynh_script_progression --message="Modifying a config file..."
mkdir -p $config_path
mkdir -p /home/yunohost.app/$app
ynh_add_config --template="../conf/config.js" --destination="$config_path/config.js"
ynh_add_config --template="../conf/config.js" --destination="/home/yunohost.app/$app/config.js"
#=================================================
# INSTALL THE LOUNGE
@ -137,7 +135,7 @@ ynh_script_progression --message="Securing files and directories..."
# Set permissions to app files
chown -R $app: $final_path
chown -R $app: $config_path
chown -R $app: /home/yunohost.app/$app
#=================================================
# INTEGRATE SERVICE IN YUNOHOST
@ -152,7 +150,7 @@ yunohost service add $app --description="Client Web IRC" --log="/var/log/$app/$a
ynh_script_progression --message="Starting a systemd service..."
# Start a systemd service
ynh_systemd_action --service_name=$app --action=start --log_path="systemd" --line_match="Available at http"
ynh_systemd_action --service_name=$app --action=start --log_path=systemd --line_match="Available at http"
#=================================================
# SETUP SSOWAT

View file

@ -19,7 +19,6 @@ app=$YNH_APP_INSTANCE_NAME
domain=$(ynh_app_setting_get --app=$app --key=domain)
port=$(ynh_app_setting_get --app=$app --key=port)
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
config_path=$(ynh_app_setting_get --app=$app --key=config_path)
#=================================================
# STANDARD REMOVE
@ -73,7 +72,7 @@ ynh_remove_nginx_config
#=================================================
ynh_script_progression --message="Removing the config file..."
ynh_secure_remove --file="$config_path"
ynh_secure_remove --file="/home/yunohost.app/$app"
#=================================================
# GENERIC FINALIZATION

View file

@ -29,7 +29,6 @@ app=$YNH_APP_INSTANCE_NAME
domain=$(ynh_app_setting_get --app=$app --key=domain)
path_url=$(ynh_app_setting_get --app=$app --key=path)
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
config_path=$(ynh_app_setting_get --app=$app --key=config_path)
#=================================================
# CHECK IF THE APP CAN BE RESTORED
@ -70,7 +69,7 @@ ynh_restore_file --origin_path="$final_path"
#=================================================
ynh_script_progression --message="Restoring the config path..."
ynh_restore_file --origin_path="$config_path"
ynh_restore_file --origin_path="/home/yunohost.app/$app"
#=================================================
# RESTORE USER RIGHTS
@ -79,7 +78,7 @@ ynh_script_progression --message="Restoring user rights..."
# Restore permissions to app files
chown -R $app: $final_path
chown -R $app: $config_path
chown -R $app: /home/yunohost.app/$app
#=================================================
# SPECIFIC RESTORATION
@ -114,7 +113,7 @@ yunohost service add $app --description="Client Web IRC" --log="/var/log/$app/$a
#=================================================
ynh_script_progression --message="Starting a systemd service..."
ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" --line_match="Available at http"
ynh_systemd_action --service_name=$app --action=start --log_path=systemd --line_match="Available at http"
#=================================================
# GENERIC FINALIZATION

View file

@ -139,7 +139,7 @@ fi
#=================================================
ynh_script_progression --message="Modifying a config file..."
ynh_add_config --template="../conf/config.js" --destination="$config_path"
ynh_add_config --template="../conf/config.js" --destination="/home/yunohost.app/$app/config.js"
#=================================================
# SETUP SYSTEMD
@ -160,7 +160,7 @@ ynh_script_progression --message="Securing files and directories..."
# Set permissions on app files
chown -R $app: $final_path
chown -R $app: $config_path
chown -R $app: /home/yunohost.app/$app
#=================================================
# GENERIC FINALIZATION
@ -176,7 +176,7 @@ yunohost service add $app --description="Client Web IRC" --log="/var/log/$app/$a
#=================================================
ynh_script_progression --message="Starting a systemd service..."
ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" --line_match="Available at http"
ynh_systemd_action --service_name=$app --action=start --log_path=systemd --line_match="Available at http"
#=================================================
# RELOAD NGINX