diff --git a/install.sh b/install.sh index e1a206b..92b2084 100755 --- a/install.sh +++ b/install.sh @@ -116,9 +116,12 @@ cp -a etc/dovecot/* /etc/dovecot/ chgrp dovecot /etc/dovecot/dovecot-sql.conf.ext chmod 640 /etc/dovecot/dovecot-sql.conf.ext sed -i "s|password=password|password=$VMAILPASS|g" /etc/dovecot/dovecot-sql.conf.ext -cp libexec/vmail-quota-warning.sh /usr/libexec/ -chmod 750 /usr/libexec/vmail-quota-warning.sh -chown dovecot:mail /usr/libexec/vmail-quota-warning.sh +if ! [ -d "/usr/local/libexec" ]; then + mkdir /usr/local/libexec +fi +cp libexec/vmail-quota-warning.sh /usr/local/libexec/ +chmod 750 /usr/local/libexec/vmail-quota-warning.sh +chown dovecot:mail /usr/local/libexec/vmail-quota-warning.sh # restart services systemctl enable spamassassin diff --git a/update.sh b/update.sh index f56f055..42a1abb 100755 --- a/update.sh +++ b/update.sh @@ -60,11 +60,11 @@ for etc_config in "${etc_configs_array[@]}"; do done # update libexec script -if ! diff -q libexec/vmail-quota-warning.sh /usr/libexec/vmail-quota-warning.sh ; then - cp libexec/vmail-quota-warning.sh /usr/libexec/vmail-quota-warning.sh - chmod 750 /usr/libexec/vmail-quota-warning.sh - chown dovecot:mail /usr/libexec/vmail-quota-warning.sh - echo "/usr/libexec/vmail-quota-warning.sh updated" +if ! diff -q libexec/vmail-quota-warning.sh /usr/local/libexec/vmail-quota-warning.sh ; then + cp libexec/vmail-quota-warning.sh /usr/local/libexec/vmail-quota-warning.sh + chmod 750 /usr/local/libexec/vmail-quota-warning.sh + chown dovecot:mail /usr/local/libexec/vmail-quota-warning.sh + echo "/usr/local/libexec/vmail-quota-warning.sh updated" echo fi