diff --git a/coolwsd.spec.in b/coolwsd.spec.in index 2e93f8d24..ff721d750 100644 --- a/coolwsd.spec.in +++ b/coolwsd.spec.in @@ -188,7 +188,7 @@ echo " Done." %post setcap cap_fowner,cap_chown,cap_mknod,cap_sys_chroot=ep /usr/bin/coolforkit setcap cap_sys_admin=ep /usr/bin/coolmount -/usr/bin/coolconfig migrateconfig --write +if [ -f /etc/loolwsd/loolwsd.xml ]; then /usr/bin/coolconfig migrateconfig --write; fi %if 0%{?rhel} >= 7 %systemd_post coolwsd.service diff --git a/debian/coolwsd.postinst.in b/debian/coolwsd.postinst.in index 2a1dba329..36a5e88be 100644 --- a/debian/coolwsd.postinst.in +++ b/debian/coolwsd.postinst.in @@ -6,7 +6,7 @@ case "$1" in configure) setcap cap_fowner,cap_chown,cap_mknod,cap_sys_chroot=ep /usr/bin/coolforkit || true setcap cap_sys_admin=ep /usr/bin/coolmount || true - /usr/bin/coolconfig migrateconfig --write + if [ -f /etc/loolwsd/loolwsd.xml ]; then /usr/bin/coolconfig migrateconfig --write || true; fi adduser --quiet --system --group --home /opt/cool cool chown cool: /etc/coolwsd/coolwsd.xml