Don't delete folder which are not created... (#3484)

... in the script. And changed the order to be consistent.
master
Michael 2020-04-18 22:26:52 +02:00 committed by GitHub
parent ca48bc9c34
commit 37b0bfdac6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -1,8 +1,8 @@
#!/bin/bash
# Create temp directories
#[[ ! -d /tmp/sa-rules-schaal ]] && mkdir -p /tmp/sa-rules-schaal
[[ ! -d /tmp/sa-rules-heinlein ]] && mkdir -p /tmp/sa-rules-heinlein
#[[ ! -d /tmp/sa-rules-schaal ]] && mkdir -p /tmp/sa-rules-schaal
# Hash current SA rules
if [[ ! -f /etc/rspamd/custom/sa-rules ]]; then
@ -40,4 +40,4 @@ fi
# Cleanup
rm -rf /tmp/sa-rules-heinlein /tmp/sa-rules-heinlein.tar.gz
rm -rf /tmp/sa-rules-schaal /tmp/sa-rules-schaal.tar.gz
#rm -rf /tmp/sa-rules-schaal /tmp/sa-rules-schaal.tar.gz