From 90bc724d1ab5c8459a094e3f2719e348e6511639 Mon Sep 17 00:00:00 2001
From: Bob Mottram <bob@freedombone.net>
Date: Sun, 1 Apr 2018 19:21:56 +0100
Subject: [PATCH] quiet

---
 src/freedombone-app-peertube | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/src/freedombone-app-peertube b/src/freedombone-app-peertube
index 1b38aa030..0b84faece 100755
--- a/src/freedombone-app-peertube
+++ b/src/freedombone-app-peertube
@@ -83,18 +83,18 @@ function peertube_import_from_syncthing {
       echo "peertubeuser=\$(sed -n 1p < \"\$search_dir/login.txt\")";
       echo "peertubepassword=\$(sed -n 2p < \"\$search_dir/login.txt\")";
       echo 'peertubensfw=';
-      echo "if grep 'nsfw' \"\$search_dir/login.txt\"; then";
+      echo "if grep -q 'nsfw' \"\$search_dir/login.txt\"; then";
       echo "    peertubensfw='--nsfw'";
       echo 'fi';
-      echo "if grep 'NSFW' \"\$search_dir/login.txt\"; then";
+      echo "if grep -q 'NSFW' \"\$search_dir/login.txt\"; then";
       echo "    peertubensfw='--nsfw'";
       echo 'fi';
       echo '';
       echo "peertubeprivate='-P 3'";
-      echo "if grep 'public' \"\$search_dir/login.txt\"; then";
+      echo "if grep -q 'public' \"\$search_dir/login.txt\"; then";
       echo "    peertubeprivate='-P 1'";
       echo 'fi';
-      echo "if grep 'Public' \"\$search_dir/login.txt\"; then";
+      echo "if grep -q 'Public' \"\$search_dir/login.txt\"; then";
       echo "    peertubeprivate='-P 1'";
       echo 'fi';
       echo '';
@@ -105,8 +105,8 @@ function peertube_import_from_syncthing {
       echo "    if [[ \"\$video_file\" == *'.ogv' || \"\$video_file\" == *'.mp4' || \"\$video_file\" == *'.webm' ]]; then";
       echo "        cd ${PEERTUBE_DIR} || exit 32468356";
       echo "        ";
-      echo "        if ! grep \"\$video_file\" /root/.peertube_uploaded; then";
-      echo "            if ! grep \"\$video_file\" /root/.peertube_uploading; then";
+      echo "        if ! grep -q \"\$video_file\" /root/.peertube_uploaded; then";
+      echo "            if ! grep -q \"\$video_file\" /root/.peertube_uploading; then";
       echo "                echo \"\$video_file\" >> /root/.peertube_uploading";
       echo "                peertubetitle=\$(basename \"\$video_file\" | awk -F '.' '{print \$1}' | sed 's|_| |g' | sed 's|-| |g')";
       echo "                if $nodecmd \$import_script -n \$peertubetitle \$peertubensfw \$peertubeprivate -u \"\$peertubedomain\" -U \"\$peertubeuser\" --password \"\$peertubepassword\" -f \"\$video_file\"; then";
@@ -122,7 +122,7 @@ function peertube_import_from_syncthing {
       echo '                fi';
       echo '            fi';
       echo '        else';
-      echo "            if grep \"\$video_file\" /root/.peertube_uploading; then";
+      echo "            if grep -q \"\$video_file\" /root/.peertube_uploading; then";
       echo "                sed -i \"/\$video_file/d\" /root/.peertube_uploading";
       echo '            fi';
       echo '        fi';
-- 
GitLab