Cleanup dsa-update-unowned-file-status and dsa-update-unowned-file-status creation...
authorPeter Palfrader <peter@palfrader.org>
Mon, 26 Nov 2018 13:25:08 +0000 (14:25 +0100)
committerPeter Palfrader <peter@palfrader.org>
Mon, 26 Nov 2018 13:25:08 +0000 (14:25 +0100)
dsa-nagios-checks/sbin/dsa-update-apt-status
dsa-nagios-checks/sbin/dsa-update-unowned-file-status

index 7919f71..c506fea 100755 (executable)
@@ -51,9 +51,7 @@ run_required() {
        return $norun
 }
 
-if [ ! -d "${STATUSDIR}" ]; then
-    mkdir -p "${STATUSDIR}"
-fi
+mkdir -p "${STATUSDIR}"
 
 # do stuff only when required, or when asked to
 if [ "${1:-""}" != "-f" ] ; then
index cc4e812..56331ef 100755 (executable)
@@ -25,9 +25,7 @@ CUTOFF=40
 STATUSDIR=/var/cache/dsa/nagios
 STATUS="${STATUSDIR}"/nouser
 
-if [ ! -d "${STATUSDIR}" ]; then
-        mkdir -p "${STATUSDIR}"
-fi
+mkdir -p "${STATUSDIR}"
 
 tmp=`tempfile`
 trap "rm -f '$tmp'" exit