mirror of
https://github.com/mail-in-a-box/mailinabox.git
synced 2025-07-07 23:50:55 +00:00
vacuum only if non-empty
the file may have already been created by the management daemon
This commit is contained in:
parent
a90d646673
commit
3f385e6835
@ -41,7 +41,8 @@ sed "s|%BIN%|$(pwd)|g" conf/miabldap-capture.service > /etc/systemd/system/miabl
|
|||||||
|
|
||||||
hide_output systemctl daemon-reload
|
hide_output systemctl daemon-reload
|
||||||
|
|
||||||
if [ -e "$db" ]; then
|
# vacuum database if it exists and is non-empty
|
||||||
|
if [ -s "$db" ]; then
|
||||||
echo "Vacuum capture database"
|
echo "Vacuum capture database"
|
||||||
hide_output systemctl stop miabldap-capture
|
hide_output systemctl stop miabldap-capture
|
||||||
hide_output /usr/bin/sqlite3 "$db" "VACUUM;"
|
hide_output /usr/bin/sqlite3 "$db" "VACUUM;"
|
||||||
|
Loading…
Reference in New Issue
Block a user