Made TTRSS-API extension work

This commit is contained in:
Dennis Schwerdel 2017-02-18 14:26:35 +01:00
parent f5390c5d25
commit fc6ca4c877
2 changed files with 29 additions and 5 deletions

View File

@ -20,11 +20,14 @@ RUN mkdir -p /app/data \
&& mv data data-orig \
&& ln -s /app/data data
RUN mkdir /app/code/extensions-orig \
&& wget https://github.com/FreshRSS/Extensions/archive/${EXTENSIONS_VERSION}.tar.gz -O - \
| tar -xz --strip-components=1 -C /app/code/extensions-orig \
&& rm -rf /app/code/extensions \
&& ln -s /app/data/extensions /app/code/extensions
ADD change-ttrss-file-path.patch /app/code/change-ttrss-file-path.patch
RUN wget https://github.com/FreshRSS/Extensions/archive/${EXTENSIONS_VERSION}.tar.gz -O - \
| tar -xz --strip-components=1 -C /app/code/extensions \
&& patch -p1 -d /app/code/extensions < /app/code/change-ttrss-file-path.patch \
&& mv /app/code/extensions /app/code/extensions-orig \
&& ln -s /app/data/extensions /app/code/extensions \
&& ln -s /app/data/extensions/ttrss.php /app/code/p/api/ttrss.php
ADD apache2.conf /etc/apache2/sites-available/freshrss.conf

View File

@ -0,0 +1,21 @@
diff -ru extensions-orig/xExtension-TTRSS_API/extension.php extensions/xExtension-TTRSS_API/extension.php
--- extensions-orig/xExtension-TTRSS_API/extension.php 2016-12-15 10:24:17.000000000 +0000
+++ extensions/xExtension-TTRSS_API/extension.php 2017-02-18 13:06:59.640761922 +0000
@@ -9,7 +9,7 @@
public function install() {
$filename = 'ttrss.php';
$file_source = join_path($this->getPath(), $filename);
- $path_destination = join_path(PUBLIC_PATH, 'api');
+ $path_destination = '/app/data/extensions';
$file_destination = join_path($path_destination, $filename);
if (!is_writable($path_destination)) {
@@ -35,7 +35,7 @@
public function uninstall() {
$filename = 'ttrss.php';
- $file_destination = join_path(PUBLIC_PATH, 'api', $filename);
+ $file_destination = join_path('/app/data/extensions', $filename);
if (file_exists($file_destination) && !unlink($file_destination)) {
return 'API file cannot be removed';