mirror of
https://github.com/YunoHost-Apps/peertube_ynh.git
synced 2024-09-03 19:56:29 +02:00
More section reordering..
This commit is contained in:
parent
677adeb352
commit
9b4881b0e8
1 changed files with 22 additions and 22 deletions
|
@ -47,10 +47,22 @@ ynh_setup_source --dest_dir="$install_dir"
|
||||||
chmod -R o-rwx "$install_dir"
|
chmod -R o-rwx "$install_dir"
|
||||||
chown -R $app:www-data "$install_dir"
|
chown -R $app:www-data "$install_dir"
|
||||||
|
|
||||||
|
#=================================================
|
||||||
|
# BUILD YARN DEPENDENCIES
|
||||||
|
#=================================================
|
||||||
|
ynh_script_progression --message="Building Yarn dependencies..."
|
||||||
|
|
||||||
|
pushd "$install_dir"
|
||||||
|
ynh_use_nodejs
|
||||||
|
npm install -g npm
|
||||||
|
ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH yarn install --production --pure-lockfile
|
||||||
|
ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH yarn cache clean
|
||||||
|
popd
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# NGINX CONFIGURATION
|
# NGINX CONFIGURATION
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Configuring NGINX web server..."
|
ynh_script_progression --message="Adding system configurations..."
|
||||||
|
|
||||||
# Create a dedicated NGINX config
|
# Create a dedicated NGINX config
|
||||||
ynh_add_nginx_config
|
ynh_add_nginx_config
|
||||||
|
@ -66,22 +78,10 @@ ynh_use_logrotate
|
||||||
|
|
||||||
yunohost service add $app --description="Federated video streaming platform" --log="/var/log/$app/$app.log" --needs_exposed_ports $port_rtmp
|
yunohost service add $app --description="Federated video streaming platform" --log="/var/log/$app/$app.log" --needs_exposed_ports $port_rtmp
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# BUILD YARN DEPENDENCIES
|
|
||||||
#=================================================
|
|
||||||
ynh_script_progression --message="Building Yarn dependencies..."
|
|
||||||
|
|
||||||
pushd "$install_dir"
|
|
||||||
ynh_use_nodejs
|
|
||||||
npm install -g npm
|
|
||||||
ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH yarn install --production --pure-lockfile
|
|
||||||
ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH yarn cache clean
|
|
||||||
popd
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# ADD A CONFIGURATION
|
# ADD A CONFIGURATION
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Adding a configuration file..."
|
ynh_script_progression --message="Adding peertube configuration file..."
|
||||||
|
|
||||||
ynh_add_config --template="production.yaml" --destination="$install_dir/config/production.yaml"
|
ynh_add_config --template="production.yaml" --destination="$install_dir/config/production.yaml"
|
||||||
chmod 400 "$install_dir/config/production.yaml"
|
chmod 400 "$install_dir/config/production.yaml"
|
||||||
|
@ -92,6 +92,14 @@ echo '{}' > "$install_dir/config/local-production.json"
|
||||||
chmod 600 "$install_dir/config/local-production.json"
|
chmod 600 "$install_dir/config/local-production.json"
|
||||||
chown $app:$app "$install_dir/config/local-production.json"
|
chown $app:$app "$install_dir/config/local-production.json"
|
||||||
|
|
||||||
|
#=================================================
|
||||||
|
# START SYSTEMD SERVICE
|
||||||
|
#=================================================
|
||||||
|
ynh_script_progression --message="Starting a systemd service..."
|
||||||
|
|
||||||
|
# Start a systemd service
|
||||||
|
ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" --line_match="HTTP server listening on localhost"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# INSTALL LDAP PLUGIN
|
# INSTALL LDAP PLUGIN
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -103,14 +111,6 @@ pushd "$install_dir"
|
||||||
echo "$admin_pass" | ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH NODE_CONFIG_DIR="$install_dir/config" NODE_ENV=production $ynh_npm run reset-password -- -u root
|
echo "$admin_pass" | ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH NODE_CONFIG_DIR="$install_dir/config" NODE_ENV=production $ynh_npm run reset-password -- -u root
|
||||||
popd
|
popd
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# START SYSTEMD SERVICE
|
|
||||||
#=================================================
|
|
||||||
ynh_script_progression --message="Starting a systemd service..."
|
|
||||||
|
|
||||||
# Start a systemd service
|
|
||||||
ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" --line_match="HTTP server listening on localhost"
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# END OF SCRIPT
|
# END OF SCRIPT
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
Loading…
Reference in a new issue