1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/invidious_ynh.git synced 2024-09-03 19:15:55 +02:00

Update install

This commit is contained in:
ericgaspar 2020-11-10 08:28:52 +01:00
parent 393557ac6f
commit fde7e7289b
No known key found for this signature in database
GPG key ID: 574F281483054D44

View file

@ -135,13 +135,18 @@ ynh_app_setting_set --app=$app --key=final_path --value=$final_path
git clone https://github.com/iv-org/invidious "$final_path" --quiet
# Create a temporary directory
tmpdir="$(mktemp -d)"
cp -a "$final_path/config/sql/{channels.sql,videos.sql,channel_videos.sql,users.sql,session_ids.sql,nonces.sql,annotations.sql,playlists.sql,playlist_videos.sql}" "tmpdir/{channels.sql,videos.sql,channel_videos.sql,users.sql,session_ids.sql,nonces.sql,annotations.sql,playlists.sql,playlist_videos.sql}"
# tmpdir="$(mktemp -d)"
# cp -a "$final_path/config/sql/{channels.sql,videos.sql,channel_videos.sql,users.sql,session_ids.sql,nonces.sql,annotations.sql,playlists.sql,playlist_videos.sql}" "tmpdir/{channels.sql,videos.sql,channel_videos.sql,users.sql,session_ids.sql,nonces.sql,annotations.sql,playlists.sql,playlist_videos.sql}"
ynh_psql_execute_file_as_root --file="tmpdir/{channels.sql,videos.sql,channel_videos.sql,users.sql,session_ids.sql,nonces.sql.sql,annotations.sql,playlists.sql,playlist_videos.sql}" --database=$db_name
# ynh_psql_execute_file_as_root --file="tmpdir/{channels.sql,videos.sql,channel_videos.sql,users.sql,session_ids.sql,nonces.sql.sql,annotations.sql,playlists.sql,playlist_videos.sql}" --database=$db_name
# # Remove the tmp directory securely
# ynh_secure_remove --file="$tmpdir"
for i in $final_path/config/sql/*.sql ; do ynh_psql_execute_file_as_root --file="$i" --database=$db_name ; done
# Remove the tmp directory securely
ynh_secure_remove --file="$tmpdir"
#=================================================
# NGINX CONFIGURATION