mirror of
https://github.com/YunoHost-Apps/lingva_ynh.git
synced 2024-09-03 19:36:20 +02:00
perubahan systemd
This commit is contained in:
parent
0f08ef9e5a
commit
440240ea75
2 changed files with 10 additions and 23 deletions
|
@ -9,13 +9,6 @@
|
||||||
source _common.sh
|
source _common.sh
|
||||||
source /usr/share/yunohost/helpers
|
source /usr/share/yunohost/helpers
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# STARTING NODEJS
|
|
||||||
#=================================================
|
|
||||||
|
|
||||||
ynh_install_nodejs --nodejs_version=$nodejs_version
|
|
||||||
ynh_use_nodejs
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# APP "BUILD" (DEPLOYING SOURCES, VENV, COMPILING ETC)
|
# APP "BUILD" (DEPLOYING SOURCES, VENV, COMPILING ETC)
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -39,11 +32,6 @@ ynh_script_progression --message="Adding system configurations related to $app..
|
||||||
# Create a dedicated NGINX config using the conf/nginx.conf template
|
# Create a dedicated NGINX config using the conf/nginx.conf template
|
||||||
ynh_add_nginx_config
|
ynh_add_nginx_config
|
||||||
|
|
||||||
# Create a dedicated systemd config
|
|
||||||
ynh_add_systemd_config
|
|
||||||
|
|
||||||
yunohost service add $app --description="alternative to google translate" --log="/var/log/$app/$app.log"
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# APP INITIAL CONFIGURATION
|
# APP INITIAL CONFIGURATION
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -73,6 +61,7 @@ echo "module.exports = { basePath: '$next_path', };" >> "$install_dir/next.confi
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Building the app..." --weight=1
|
ynh_script_progression --message="Building the app..." --weight=1
|
||||||
|
|
||||||
|
ynh_install_nodejs --nodejs_version=$nodejs_version
|
||||||
ynh_use_nodejs
|
ynh_use_nodejs
|
||||||
ynh_exec_warn_less ynh_exec_as $app $ynh_node_load_PATH $ynh_npm install --prefix="$install_dir"
|
ynh_exec_warn_less ynh_exec_as $app $ynh_node_load_PATH $ynh_npm install --prefix="$install_dir"
|
||||||
npx next telemetry disable
|
npx next telemetry disable
|
||||||
|
@ -85,6 +74,10 @@ ynh_exec_warn_less ynh_exec_as $app $ynh_node_load_PATH $ynh_npm run build --pre
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Starting a systemd service..." --weight=1
|
ynh_script_progression --message="Starting a systemd service..." --weight=1
|
||||||
|
|
||||||
|
ynh_add_systemd_config
|
||||||
|
|
||||||
|
yunohost service add $app --description="alternative to google translate" --log="/var/log/$app/$app.log"
|
||||||
|
|
||||||
# Start a systemd service
|
# Start a systemd service
|
||||||
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="/var/log/$app/$app.log"
|
||||||
|
|
||||||
|
|
|
@ -81,12 +81,6 @@ fi
|
||||||
# ownership to all files such as after the ynh_setup_source step
|
# ownership to all files such as after the ynh_setup_source step
|
||||||
chown -R $app:www-data "$install_dir"
|
chown -R $app:www-data "$install_dir"
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# STARTING NODEJS
|
|
||||||
#=================================================
|
|
||||||
|
|
||||||
ynh_use_nodejs
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# REAPPLY SYSTEM CONFIGURATIONS
|
# REAPPLY SYSTEM CONFIGURATIONS
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -95,11 +89,6 @@ ynh_script_progression --message="Upgrading system configurations related to $ap
|
||||||
# Create a dedicated NGINX config using the conf/nginx.conf template
|
# Create a dedicated NGINX config using the conf/nginx.conf template
|
||||||
ynh_add_nginx_config
|
ynh_add_nginx_config
|
||||||
|
|
||||||
# Create a dedicated systemd config
|
|
||||||
ynh_add_systemd_config
|
|
||||||
|
|
||||||
yunohost service add $app --description="alternative to google translate" --log="/var/log/$app/$app.log"
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# RECONFIGURE THE APP (UPDATE CONF, APPLY MIGRATIONS...)
|
# RECONFIGURE THE APP (UPDATE CONF, APPLY MIGRATIONS...)
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -131,6 +120,11 @@ ynh_exec_warn_less ynh_exec_as $app $ynh_node_load_PATH $ynh_npm run build --pre
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Starting a systemd service..." --weight=1
|
ynh_script_progression --message="Starting a systemd service..." --weight=1
|
||||||
|
|
||||||
|
# Create a dedicated systemd config
|
||||||
|
ynh_add_systemd_config
|
||||||
|
|
||||||
|
yunohost service add $app --description="alternative to google translate" --log="/var/log/$app/$app.log"
|
||||||
|
|
||||||
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="/var/log/$app/$app.log"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
Loading…
Reference in a new issue