1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/codimd_ynh.git synced 2024-09-03 18:16:32 +02:00
This commit is contained in:
ericgaspar 2021-05-08 15:31:11 +02:00
parent 98f9b630ec
commit 546d52b2ba
No known key found for this signature in database
GPG key ID: 574F281483054D44
2 changed files with 11 additions and 28 deletions

View file

@ -69,9 +69,6 @@ ynh_exec_warn_less ynh_install_app_dependencies $pkg_dependencies
# Install Nodejs
ynh_exec_warn_less ynh_install_nodejs --nodejs_version=$nodejs_version
# Install Yarn
ynh_install_extra_app_dependencies --repo="deb https://dl.yarnpkg.com/debian/ stable main" --package="yarn" --key="https://dl.yarnpkg.com/debian/pubkey.gpg"
#=================================================
# CREATE DEDICATED USER
#=================================================
@ -118,29 +115,27 @@ ynh_script_progression --message="Building CodiMD... (this will take some time a
pushd "$final_path" || ynh_die
ynh_use_nodejs
ynh_exec_warn_less bin/setup
ynh_exec_warn_less yarn run build
ynh_exec_warn_less ynh_npm run build
popd || ynh_die
#=================================================
# SETUP SYSTEMD
#=================================================
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"
ynh_replace_string --match_string="__YNH_NPM__" --replace_string="$ynh_npm" --target_file="../conf/systemd.service"
ynh_add_systemd_config
#=================================================
# MODIFY A CONFIG FILE
#=================================================
ynh_script_progression --message="Modifying a config file..."
path=${path_url:1}
ynh_add_config --template="../conf/config.json.example" --destination="$final_path/config.json"
ynh_add_config --template="../conf/.sequelizerc.example" --destination="$final_path/.sequelizerc"
#=================================================
# SETUP SYSTEMD
#=================================================
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"
ynh_add_systemd_config
#=================================================
# GENERIC FINALIZATION
#=================================================

View file

@ -113,9 +113,6 @@ ynh_exec_warn_less ynh_install_app_dependencies $pkg_dependencies
# Install Nodejs
ynh_exec_warn_less ynh_install_nodejs --nodejs_version=$nodejs_version
# Install Yarn
ynh_install_extra_app_dependencies --repo="deb https://dl.yarnpkg.com/debian/ stable main" --package="yarn" --key="https://dl.yarnpkg.com/debian/pubkey.gpg"
#=================================================
# CREATE DEDICATED USER
#=================================================
@ -136,25 +133,16 @@ then
pushd "$final_path" || ynh_die
ynh_use_nodejs
ynh_exec_warn_less bin/setup
ynh_exec_warn_less yarn run build
ynh_exec_warn_less ynh_npm run build
popd || ynh_die
fi
#=================================================
# MODIFY A CONFIG FILE
#=================================================
#ynh_script_progression --message="Modifying a config file..." --weight=2
#path=${path_url:1}
#ynh_add_config --template="../conf/config.json.example" --destination="$final_path/config.json"
#=================================================
# SETUP SYSTEMD
#=================================================
ynh_script_progression --message="Configuring a systemd service..." --weight=2
ynh_replace_string --match_string="__ENV_PATH__" --replace_string="$PATH" --target_file="../conf/systemd.service"
ynh_replace_string --match_string="__YNH_NPM__" --replace_string="$ynh_npm" --target_file="../conf/systemd.service"
# Create a dedicated systemd config
ynh_add_systemd_config