mirror of
https://github.com/YunoHost-Apps/thelounge_ynh.git
synced 2024-09-03 20:35:54 +02:00
Fix
This commit is contained in:
parent
69d7448072
commit
f0eabf81c7
6 changed files with 14 additions and 20 deletions
|
@ -21,7 +21,6 @@
|
||||||
upgrade=1 from_commit=bd00c8e3ce43563f33fde073cf36b997c348d05c
|
upgrade=1 from_commit=bd00c8e3ce43563f33fde073cf36b997c348d05c
|
||||||
backup_restore=1
|
backup_restore=1
|
||||||
multi_instance=0
|
multi_instance=0
|
||||||
port_already_use=0
|
|
||||||
change_url=1
|
change_url=1
|
||||||
;;; Options
|
;;; Options
|
||||||
Email=
|
Email=
|
||||||
|
|
|
@ -23,7 +23,6 @@ ynh_print_info --message="Loading installation settings..."
|
||||||
app=$YNH_APP_INSTANCE_NAME
|
app=$YNH_APP_INSTANCE_NAME
|
||||||
|
|
||||||
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
|
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)
|
domain=$(ynh_app_setting_get --app=$app --key=domain)
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -53,7 +52,7 @@ ynh_backup --src_path="/etc/systemd/system/$app.service"
|
||||||
# BACKUP CONFIG
|
# BACKUP CONFIG
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
ynh_backup --src_path="$config_path"
|
ynh_backup --src_path="/home/yunohost.app/$app"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# END OF SCRIPT
|
# END OF SCRIPT
|
||||||
|
|
|
@ -34,7 +34,6 @@ app=$YNH_APP_INSTANCE_NAME
|
||||||
ynh_script_progression --message="Validating installation parameters..."
|
ynh_script_progression --message="Validating installation parameters..."
|
||||||
|
|
||||||
final_path=/var/www/$app
|
final_path=/var/www/$app
|
||||||
config_path=/home/yunohost.app/$app
|
|
||||||
test ! -e "$final_path" || ynh_die --message="This path already contains a folder"
|
test ! -e "$final_path" || ynh_die --message="This path already contains a folder"
|
||||||
|
|
||||||
# Register (book) web path
|
# 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_script_progression --message="Storing installation settings..."
|
||||||
|
|
||||||
ynh_app_setting_set --app=$app --key=domain --value=$domain
|
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=path --value=$path_url
|
||||||
ynh_app_setting_set --app=$app --key=config_path --value=$config_path
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# STANDARD MODIFICATIONS
|
# STANDARD MODIFICATIONS
|
||||||
|
@ -103,9 +101,9 @@ ynh_add_nginx_config
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Modifying a config file..."
|
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
|
# INSTALL THE LOUNGE
|
||||||
|
@ -137,7 +135,7 @@ ynh_script_progression --message="Securing files and directories..."
|
||||||
|
|
||||||
# Set permissions to app files
|
# Set permissions to app files
|
||||||
chown -R $app: $final_path
|
chown -R $app: $final_path
|
||||||
chown -R $app: $config_path
|
chown -R $app: /home/yunohost.app/$app
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# INTEGRATE SERVICE IN YUNOHOST
|
# 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..."
|
ynh_script_progression --message="Starting a systemd service..."
|
||||||
|
|
||||||
# Start 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
|
# SETUP SSOWAT
|
||||||
|
|
|
@ -19,7 +19,6 @@ app=$YNH_APP_INSTANCE_NAME
|
||||||
domain=$(ynh_app_setting_get --app=$app --key=domain)
|
domain=$(ynh_app_setting_get --app=$app --key=domain)
|
||||||
port=$(ynh_app_setting_get --app=$app --key=port)
|
port=$(ynh_app_setting_get --app=$app --key=port)
|
||||||
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
|
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
|
||||||
config_path=$(ynh_app_setting_get --app=$app --key=config_path)
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# STANDARD REMOVE
|
# STANDARD REMOVE
|
||||||
|
@ -73,7 +72,7 @@ ynh_remove_nginx_config
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Removing the config file..."
|
ynh_script_progression --message="Removing the config file..."
|
||||||
|
|
||||||
ynh_secure_remove --file="$config_path"
|
ynh_secure_remove --file="/home/yunohost.app/$app"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# GENERIC FINALIZATION
|
# GENERIC FINALIZATION
|
||||||
|
|
|
@ -29,7 +29,6 @@ app=$YNH_APP_INSTANCE_NAME
|
||||||
domain=$(ynh_app_setting_get --app=$app --key=domain)
|
domain=$(ynh_app_setting_get --app=$app --key=domain)
|
||||||
path_url=$(ynh_app_setting_get --app=$app --key=path)
|
path_url=$(ynh_app_setting_get --app=$app --key=path)
|
||||||
final_path=$(ynh_app_setting_get --app=$app --key=final_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
|
# 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_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
|
# RESTORE USER RIGHTS
|
||||||
|
@ -79,7 +78,7 @@ ynh_script_progression --message="Restoring user rights..."
|
||||||
|
|
||||||
# Restore permissions to app files
|
# Restore permissions to app files
|
||||||
chown -R $app: $final_path
|
chown -R $app: $final_path
|
||||||
chown -R $app: $config_path
|
chown -R $app: /home/yunohost.app/$app
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# SPECIFIC RESTORATION
|
# 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_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
|
# GENERIC FINALIZATION
|
||||||
|
|
|
@ -139,7 +139,7 @@ fi
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Modifying a config file..."
|
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
|
# SETUP SYSTEMD
|
||||||
|
@ -160,7 +160,7 @@ ynh_script_progression --message="Securing files and directories..."
|
||||||
|
|
||||||
# Set permissions on app files
|
# Set permissions on app files
|
||||||
chown -R $app: $final_path
|
chown -R $app: $final_path
|
||||||
chown -R $app: $config_path
|
chown -R $app: /home/yunohost.app/$app
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# GENERIC FINALIZATION
|
# 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_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
|
# RELOAD NGINX
|
||||||
|
|
Loading…
Add table
Reference in a new issue