mirror of
https://github.com/YunoHost-Apps/peertube_remote_runner_ynh.git
synced 2024-09-03 19:56:21 +02:00
Update restore
This commit is contained in:
parent
a0701755c5
commit
86b5d62c0a
1 changed files with 3 additions and 16 deletions
|
@ -27,14 +27,11 @@ ynh_script_progression --message="Restoring the data directory..." --weight=1
|
|||
ynh_restore_file --origin_path="$data_dir" --not_mandatory
|
||||
|
||||
#=================================================
|
||||
# (RE)INSTALL NPM MODULE
|
||||
# INSTALL DEPENDENCIES
|
||||
#=================================================
|
||||
ynh_script_progression --message="Installing Peertube remote runner npm module..." --weight=1
|
||||
ynh_script_progression --message="Installing dependencies..."
|
||||
|
||||
pushd "$install_dir"
|
||||
ynh_use_nodejs
|
||||
ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH NODE_CONFIG_DIR="$install_dir/config" NODE_ENV=production $ynh_npm install @peertube/peertube-runner
|
||||
popd
|
||||
ynh_exec_warn_less ynh_install_nodejs --nodejs_version=$nodejs_version
|
||||
|
||||
#=================================================
|
||||
# RESTORE SYSTEM CONFIGURATIONS
|
||||
|
@ -53,20 +50,10 @@ yunohost service add $app --description="Peertube remote runner" --log="/var/log
|
|||
#=================================================
|
||||
ynh_script_progression --message="Reloading NGINX web server and $app's service..." --weight=1
|
||||
|
||||
# Typically you only have either $app or php-fpm but not both at the same time...
|
||||
ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$app/$app.log"
|
||||
|
||||
ynh_systemd_action --service_name=nginx --action=reload
|
||||
|
||||
#=================================================
|
||||
# RUNNER REGISTRATION
|
||||
#=================================================
|
||||
|
||||
pushd "$install_dir"
|
||||
ynh_use_nodejs
|
||||
ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH NODE_CONFIG_DIR="$install_dir/config" NODE_ENV=production $ynh_node "$install_dir/node_modules/@peertube/peertube-runner" register --url $peertube_url --registration-token $runner_token --runner-name $app\_$runner_id
|
||||
popd
|
||||
|
||||
#=================================================
|
||||
# END OF SCRIPT
|
||||
#=================================================
|
||||
|
|
Loading…
Add table
Reference in a new issue