1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/kresus_ynh.git synced 2024-09-03 19:36:10 +02:00
kresus_ynh/scripts/upgrade

51 lines
1.4 KiB
Text
Raw Normal View History

2016-09-09 11:07:28 +02:00
#!/bin/bash
2018-04-14 22:02:50 +02:00
#=================================================
# GENERIC START
#=================================================
# IMPORT GENERIC HELPERS
#=================================================
source _common.sh
source /usr/share/yunohost/helpers
#=================================================
# MANAGE SCRIPT FAILURE
#=================================================
# Exit if an error occurs during the execution of the script
ynh_abort_if_errors
# TODO: handle "/home/ynh$app" to final_path migration
2016-09-09 11:07:28 +02:00
app=$YNH_APP_INSTANCE_NAME
# Source YunoHost helpers
2017-09-17 11:03:01 +02:00
source /usr/share/yunohost/helpers
2016-09-09 11:07:28 +02:00
# Retrieve app settings
2018-04-14 22:02:50 +02:00
# domain=$(ynh_app_setting_get "$app" domain)
# path=$(ynh_app_setting_get "$app" path)
2016-09-09 11:07:28 +02:00
# Build the app
2018-04-14 22:02:50 +02:00
# src_path=/home/yunohost.app/$app
# mkdir -p $src_path $src_path/node_modules
# git clone https://framagit.org/bnjbvr/kresus.git $src_path
# npm install --prefix $src_path $src_path
# .$src_path/scripts/build.sh
2016-09-09 11:07:28 +02:00
# Modify Nginx configuration file and copy it to Nginx conf directory
2018-04-14 22:02:50 +02:00
# nginx_conf=../conf/nginx.conf
# sed -i "s@YNH_WWW_PATH@$path@g" $nginx_conf
# cp $nginx_conf /etc/nginx/conf.d/$domain.d/$app.conf
2016-09-09 11:07:28 +02:00
# Setup service
2018-04-14 22:02:50 +02:00
# systemd_service=../conf/kresus.service
# sed -i "s@APP_TO_CHANGE@$app@g" $systemd_service
# cp $systemd_service /etc/systemd/system/$app.service
# systemctl enable $app
# systemctl start $app
2017-09-17 11:03:01 +02:00
2016-09-09 11:07:28 +02:00
# Reload nginx service
2018-04-14 22:02:50 +02:00
service nginx reload