1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/ethercalc_ynh.git synced 2024-09-03 18:26:36 +02:00
This commit is contained in:
ericgaspar 2022-04-09 09:48:58 +02:00
parent 7b4597a055
commit 5faba7307f
7 changed files with 18 additions and 18 deletions

View file

@ -1,10 +1,5 @@
location ^~ / {
# Force usage of https
if ($scheme = http) {
rewrite ^ https://$server_name$request_uri? permanent;
}
proxy_pass http://127.0.0.1:__PORT__/;
proxy_redirect off;
proxy_set_header Host $host;

View file

@ -1,5 +1,5 @@
[Unit]
Description=Ethercalc: collaborative spreadsheet editor.
Description=Ethercalc: collaborative spreadsheet editor
After=network.target
[Service]

View file

@ -6,7 +6,7 @@
"en": "Real-time collaborative spreadsheet editor",
"fr": "Feuille de calcul collaborative en ligne"
},
"version": "20201228~ynh4",
"version": "20201228~ynh5",
"url": "https://ethercalc.net/",
"upstream": {
"license": "CPAL-1.0",
@ -22,7 +22,7 @@
},
"multi_instance": true,
"requirements": {
"yunohost": ">= 4.2.4"
"yunohost": ">= 4.3.0"
},
"services": [
"nginx"

View file

@ -70,7 +70,7 @@ fi
#=================================================
ynh_script_progression --message="Stopping a systemd service..." --weight=1
ynh_systemd_action --service_name=$app --action="stop" --log_path="/var/log/$app/$app.log"
ynh_systemd_action --service_name=$app --action="stop" --log_path="systemd"
#=================================================
# MODIFY URL IN NGINX CONF
@ -108,7 +108,7 @@ fi
#=================================================
ynh_script_progression --message="Starting a systemd service..." --weight=3
ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$app/$app.log"
ynh_systemd_action --service_name=$app --action="start" --log_path="systemd"
#=================================================
# RELOAD NGINX

View file

@ -113,8 +113,7 @@ popd
#=================================================
ynh_script_progression --message="Configuring a systemd service..." --weight=1
ynh_replace_string --match_string="__ENV_PATH__" --replace_string="$PATH" --target_file="../conf/systemd.service"
env_path="$PATH"
ynh_add_systemd_config
#=================================================

View file

@ -29,9 +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)
db_name=$(ynh_app_setting_get --app=$app --key=db_name)
db_user=$db_name
phpversion=$(ynh_app_setting_get --app=$app --key=phpversion)
#=================================================
# CHECK IF THE APP CAN BE RESTORED
@ -99,7 +96,7 @@ yunohost service add $app --description "Collaborative spreadsheet editor" --log
#=================================================
ynh_script_progression --message="Starting a systemd service..." --weight=1
ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$app/$app.log"
ynh_systemd_action --service_name=$app --action="start" --log_path="systemd"
#=================================================
# GENERIC FINALIZATION

View file

@ -66,7 +66,7 @@ fi
#=================================================
ynh_script_progression --message="Stopping a systemd service..." --weight=3
ynh_systemd_action --service_name=$app --action="stop" --log_path="/var/log/$app/$app.log"
ynh_systemd_action --service_name=$app --action="stop" --log_path="systemd"
#=================================================
# CREATE DEDICATED USER
@ -120,6 +120,15 @@ pushd "$final_path"
ynh_exec_warn_less npm i zappajs
popd
#=================================================
# SETUP SYSTEMD
#=================================================
ynh_script_progression --message="Upgrading systemd configuration..." --weight=1
env_path="$PATH"
# Create a dedicated systemd config
ynh_add_systemd_config
#=================================================
# INTEGRATE SERVICE IN YUNOHOST
#=================================================
@ -132,7 +141,7 @@ yunohost service add $app --description "Collaborative spreadsheet editor" --log
#=================================================
ynh_script_progression --message="Starting a systemd service..." --weight=5
ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$app/$app.log"
ynh_systemd_action --service_name=$app --action="start" --log_path="systemd"
#=================================================
# RELOAD NGINX