Initialise rss reader database

This commit is contained in:
Bob Mottram 2016-02-23 11:01:11 +00:00
parent 9c14685b00
commit 6f297f771a
1 changed files with 7 additions and 0 deletions

View File

@ -8424,6 +8424,13 @@ function install_rss_reader {
echo " define('CONFIG_VERSION', 26);" >> $RSS_READER_PATH/config.php
fi
# initialize the database
if [ ! -f $RSS_READER_PATH/schema/ttrss_schema_mysql.sql ]; then
echo $'No database schema found for rss reader'
exit 52926
fi
mysql -u root --password="$MARIADB_PASSWORD" -D ttrss < $RSS_READER_PATH/schema/ttrss_schema_mysql.sql
# ensure that socks5 proxy is used
if ! grep -q "CURLOPT_PROXYTYPE" $RSS_READER_PATH/plugins/af_unburn/init.php; then
sed -i '/curl_setopt($ch, CURLOPT_PROXY, _CURL_HTTP_PROXY);/a \\t\t\t\t\tcurl_setopt($ch, CURLOPT_PROXYTYPE, CURLPROXY_SOCKS5);' $RSS_READER_PATH/plugins/af_unburn/init.php