From 362484f92ceaaa01e10f3b4375ba9add9b739581 Mon Sep 17 00:00:00 2001 From: Lukas Heiligenbrunner Date: Tue, 27 Oct 2020 12:48:26 +0100 Subject: [PATCH] make scandir independent of calldirectory of reindex script remove log after postinst reindex --- .gitlab-ci.yml | 1 + api/extractvideopreviews.php | 2 +- deb/OpenMediaCenter/DEBIAN/postinst | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a70a722..e86de67 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -85,4 +85,5 @@ deploy_test1: - '[[ -f /.dockerenv ]] && echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config' - scp deb/OpenMediaCenter-*.deb root@192.168.0.42:/tmp/ - ssh root@192.168.0.42 "DEBIAN_FRONTEND=noninteractive apt-get --reinstall -y -qq install /tmp/OpenMediaCenter-*.deb && rm /tmp/OpenMediaCenter-*.deb" + allow_failure: true diff --git a/api/extractvideopreviews.php b/api/extractvideopreviews.php index 2080e36..57cc8b2 100755 --- a/api/extractvideopreviews.php +++ b/api/extractvideopreviews.php @@ -14,5 +14,5 @@ $vp->writeLog("starting extraction!!\n"); $sett = new SSettings(); // load video path from settings -$scandir = "../" . $sett->getVideoPath(); +$scandir = __DIR__ . "/../" . $sett->getVideoPath(); $vp->extractVideos($scandir); diff --git a/deb/OpenMediaCenter/DEBIAN/postinst b/deb/OpenMediaCenter/DEBIAN/postinst index b4f5637..d35f6b0 100755 --- a/deb/OpenMediaCenter/DEBIAN/postinst +++ b/deb/OpenMediaCenter/DEBIAN/postinst @@ -33,3 +33,4 @@ systemctl restart nginx # trigger a movie reindex php /var/www/openmediacenter/api/extractvideopreviews.php +rm /tmp/output.log