Commit ef7de9aa authored by Paul Cammish's avatar Paul Cammish

Fix install case where directory doesnt exist

parent 415730ee
Pipeline #891 passed with stages
in 25 minutes and 48 seconds
......@@ -156,10 +156,12 @@ if [ -d /etc/sympl ]; then
\( -type f ! -perm 664 $VERBOSE -exec chmod 664 {} \; \
-o -type d ! -perm 775 $VERBOSE -exec chmod 775 {} \; \)
# Make sure theres at least something executable in the backup pre/post scripts
if [ $(find "/etc/sympl/backup.d/" -type f \( -path '*/backup.d/post-backup.d/*' -o -path '*/backup.d/pre-backup.d/*' \) -name '*-*' -executable | wc -l) == 0 ]; then
chmod +x /etc/sympl/backup.d/post-backup.d/*
chmod +x /etc/sympl/backup.d/pre-backup.d/*
if [ -d /etc/sympl/backup.d/post-backup.d ] || [ -d /etc/sympl/backup.d/pre-backup.d ]; then
# Make sure theres at least something executable in the backup pre/post scripts
if [ $(find "/etc/sympl/backup.d/" -type f \( -path '*/backup.d/post-backup.d/*' -o -path '*/backup.d/pre-backup.d/*' \) -name '*-*' -executable | wc -l) == 0 ]; then
chmod +x /etc/sympl/backup.d/post-backup.d/* 2&> /dev/null || true
chmod +x /etc/sympl/backup.d/pre-backup.d/* 2&> /dev/null || true
fi
fi
fi
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment