From aa50559ac7057676e04666916d33c68fd42278c0 Mon Sep 17 00:00:00 2001 From: x86dev Date: Fri, 14 Jul 2017 11:28:39 +0200 Subject: [PATCH] update-ttrss.sh: Fixes for update_common(). --- root/srv/update-ttrss.sh | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/root/srv/update-ttrss.sh b/root/srv/update-ttrss.sh index b11617e..f5401a7 100755 --- a/root/srv/update-ttrss.sh +++ b/root/srv/update-ttrss.sh @@ -52,23 +52,15 @@ update_theme_feedly() update_common() { echo "Updating: Updating permissions" - for dir in /etc/nginx /etc/php5 /var/log /var/lib/nginx /tmp /etc/services.d; do - if $(find $dir ! -user $UID -o ! -group $GID | egrep '.' -q); then - echo "Updating: Updating permissions in $dir..." - chown -R $UID:$GID $dir - else - echo "Updating: Permissions in $dir are correct" - fi + for CUR_DIR in /etc/nginx /etc/php5 /var/log /var/lib/nginx /tmp /etc/services.d; do + chown -R $UID:$GID ${CUR_DIR} done chown -R www-data:www-data ${TTRSS_PATH} - echo "Updating: updating permissions done" + echo "Updating: Updating permissions done" } -echo "Update: Updating rolling release ..." -echo "Update: Stopping all ..." - update_ttrss update_plugin_mobilize update_plugin_newsplus @@ -81,6 +73,7 @@ echo "Update: Done" if [ "$1" != "--no-start" ]; then echo "Update: Starting all ..." fi + if [ "$1" = "--wait-exit" ]; then UPDATE_WAIT_TIME=$2 if [ -z "$UPDATE_WAIT_TIME" ]; then