1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/luckysheet_ynh.git synced 2024-09-03 19:36:21 +02:00
This commit is contained in:
ericgaspar 2021-05-27 13:24:40 +02:00
parent 61ab9e14cd
commit b66d5c8be6
No known key found for this signature in database
GPG key ID: 574F281483054D44
3 changed files with 17 additions and 19 deletions

View file

@ -10,7 +10,7 @@ Group=__APP__
WorkingDirectory=__FINALPATH__ WorkingDirectory=__FINALPATH__
Environment="PATH=__ENV_PATH__" Environment="PATH=__ENV_PATH__"
Environment="NODE_ENV=production" Environment="NODE_ENV=production"
ExecStart=__YNH_NPM__ run ExecStart=__YNH_NPM__ run build
Restart=always Restart=always
PrivateTmp=true PrivateTmp=true
PrivateDevices=true PrivateDevices=true

View file

@ -67,6 +67,14 @@ ynh_script_progression --message="Installing dependencies..." --weight=20
# Install Nodejs # Install Nodejs
ynh_exec_warn_less ynh_install_nodejs --nodejs_version=$nodejs_version ynh_exec_warn_less ynh_install_nodejs --nodejs_version=$nodejs_version
#=================================================
# CREATE DEDICATED USER
#=================================================
ynh_script_progression --message="Configuring system user..." --weight=3
# Create a system user
ynh_system_user_create --username=$app --home_dir=$final_path
#================================================= #=================================================
# DOWNLOAD, CHECK AND UNPACK SOURCE # DOWNLOAD, CHECK AND UNPACK SOURCE
#================================================= #=================================================
@ -84,14 +92,6 @@ ynh_script_progression --message="Configuring NGINX web server..." --weight=2
# Create a dedicated NGINX config # Create a dedicated NGINX config
ynh_add_nginx_config ynh_add_nginx_config
#=================================================
# CREATE DEDICATED USER
#=================================================
ynh_script_progression --message="Configuring system user..." --weight=3
# Create a system user
ynh_system_user_create --username=$app --home_dir=$final_path
#================================================= #=================================================
# SPECIFIC SETUP # SPECIFIC SETUP
#============================================== #==============================================
@ -100,11 +100,9 @@ ynh_system_user_create --username=$app --home_dir=$final_path
ynh_script_progression --message="Building Luckysheet... (this will take some time and resources!)" --weight=20 ynh_script_progression --message="Building Luckysheet... (this will take some time and resources!)" --weight=20
pushd "$final_path" || ynh_die pushd "$final_path" || ynh_die
ynh_use_nodejs ynh_use_nodejs
ynh_exec_warn_less ynh_npm install ynh_exec_warn_less ynh_npm install
ynh_exec_warn_less ynh_npm install gulp -g ynh_exec_warn_less ynh_npm install gulp -g
popd || ynh_die popd || ynh_die
#================================================= #=================================================

View file

@ -63,6 +63,14 @@ ynh_script_progression --message="Stopping a systemd service..." --weight=1
ynh_systemd_action --service_name=$app --action=stop --log_path=systemd ynh_systemd_action --service_name=$app --action=stop --log_path=systemd
#=================================================
# CREATE DEDICATED USER
#=================================================
ynh_script_progression --message="Making sure dedicated system user exists..." --weight=1
# Create a dedicated user (if not existing)
ynh_system_user_create --username=$app --home_dir=$final_path
#================================================= #=================================================
# DOWNLOAD, CHECK AND UNPACK SOURCE # DOWNLOAD, CHECK AND UNPACK SOURCE
#================================================= #=================================================
@ -94,14 +102,6 @@ ynh_script_progression --message="Upgrading dependencies..." --weight=18
# Install Nodejs # Install Nodejs
ynh_exec_warn_less ynh_install_nodejs --nodejs_version=$nodejs_version ynh_exec_warn_less ynh_install_nodejs --nodejs_version=$nodejs_version
#=================================================
# CREATE DEDICATED USER
#=================================================
ynh_script_progression --message="Making sure dedicated system user exists..." --weight=1
# Create a dedicated user (if not existing)
ynh_system_user_create --username=$app
#================================================= #=================================================
# SPECIFIC UPGRADE # SPECIFIC UPGRADE
#============================================== #==============================================