1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/invidious_ynh.git synced 2024-09-03 19:15:55 +02:00
This commit is contained in:
ericgaspar 2021-05-23 10:27:58 +02:00
parent 3faf613ba6
commit b384c068c3
No known key found for this signature in database
GPG key ID: 574F281483054D44
2 changed files with 11 additions and 25 deletions

View file

@ -106,6 +106,10 @@ for i in $final_path/config/sql/*.sql ; do
ynh_psql_connect_as --user=$db_user --password=$db_pwd --database=$db_name < "$i" ;
done
chmod 750 "$final_path"
chmod -R o-rwx "$final_path"
chown -R $app:www-data "$final_path"
#=================================================
# NGINX CONFIGURATION
#=================================================
@ -119,7 +123,7 @@ ynh_add_nginx_config
#=================================================
# INSTALL INVIDIOUS
#=================================================
ynh_script_progression --message="Building Invidious.. (this will take some time and resources!)" --weight=10
ynh_script_progression --message="Building Invidious.. (this will take some time and resources!)" --weight=60
pushd "$final_path" || ynh_die
shards update && shards install
@ -132,6 +136,7 @@ popd || ynh_die
ynh_script_progression --message="Modifying a config file..."
ynh_add_config --template="../conf/config.yml" --destination="$final_path/config/config.yml"
chmod 600 $final_path/config/config.yml
#=================================================
# SETUP SYSTEMD
@ -156,19 +161,6 @@ ynh_script_progression --message="Configuring log rotation..." --weight=1
# Use logrotate to manage application logfile(s)
ynh_use_logrotate
#=================================================
# GENERIC FINALIZATION
#=================================================
# SECURE FILES AND DIRECTORIES
#=================================================
ynh_script_progression --message="Securing files and directories..." --weight=1
# Set permissions to app files
chmod 750 "$final_path"
chmod -R o-rwx "$final_path"
chown -R $app:www-data "$final_path"
chmod 600 $final_path/config/config.yml
#=================================================
# INTEGRATE SERVICE IN YUNOHOST
#=================================================

View file

@ -107,6 +107,11 @@ then
ynh_secure_remove --file="$tmpdir"
fi
chmod 750 "$final_path"
chmod -R o-rwx "$final_path"
chown -R $app:www-data "$final_path"
chmod 600 $final_path/config/config.yml
#=================================================
# NGINX CONFIGURATION
#=================================================
@ -141,17 +146,6 @@ ynh_script_progression --message="Upgrading logrotate configuration..." --weight
# Use logrotate to manage app-specific logfile(s)
ynh_use_logrotate --non-append
#=================================================
# SECURE FILES AND DIRECTORIES
#=================================================
ynh_script_progression --message="Securing files and directories..." --weight=1
# Set permissions on app files
chmod 750 "$final_path"
chmod -R o-rwx "$final_path"
chown -R $app:www-data "$final_path"
chmod 600 $final_path/config/config.yml
#=================================================
# INTEGRATE SERVICE IN YUNOHOST
#=================================================