]> arthur.barton.de Git - netdata.git/commitdiff
fix logrotate file permissions; #1456
authorCosta Tsaousis (ktsaou) <costa@tsaousis.gr>
Tue, 27 Dec 2016 19:29:12 +0000 (21:29 +0200)
committerCosta Tsaousis (ktsaou) <costa@tsaousis.gr>
Tue, 27 Dec 2016 19:29:12 +0000 (21:29 +0200)
netdata-installer.sh

index aae4e6281143a5214abe1df430f333364fef5062..d16f1b1331b836f52fe2636f147bd632fa51db1d 100755 (executable)
@@ -657,7 +657,7 @@ portable_add_user_to_group() {
     fi
 }
 
-run find ./system/ -type f -a \! -name \*.in -a \! -name Makefile\* -a \! -name \*.conf  -a \! -name \*.service -exec chmod 755 {} \;
+run find ./system/ -type f -a \! -name \*.in -a \! -name Makefile\* -a \! -name \*.conf -a \! -name \*.service -a \! -name \*.logrotate -exec chmod 755 {} \;
 
 NETDATA_ADDED_TO_DOCKER=0
 NETDATA_ADDED_TO_NGINX=0
@@ -673,6 +673,12 @@ if [ ${UID} -eq 0 ]
         echo >&2 "Adding netdata logrotate configuration ..."
         run cp system/netdata.logrotate /etc/logrotate.d/netdata
     fi
+    
+    if [ -f /etc/logrotate.d/netdata ]
+        then
+        echo >&2 "Fixing netdata logrotate permissions ..."
+        run chmod 644 /etc/logrotate.d/netdata
+    fi
 fi