diff --git a/.pkgr.yml b/.pkgr.yml index d0e9c4db2..2a9afa6da 100644 --- a/.pkgr.yml +++ b/.pkgr.yml @@ -116,4 +116,5 @@ env: - ZAMMAD_WEBSOCKET_PORT=6042 services: - postgres +before_install: contrib/packager.io/preinstall.sh after_install: contrib/packager.io/postinstall.sh diff --git a/contrib/packager.io/preinstall.sh b/contrib/packager.io/preinstall.sh new file mode 100755 index 000000000..00940c560 --- /dev/null +++ b/contrib/packager.io/preinstall.sh @@ -0,0 +1,12 @@ +#!/bin/bash +# +# packager.io preinstall script +# + +# +# Make sure that after installation/update there can be only one sprockets manifest, +# the one coming from the package. The package manager will ignore any duplicate files +# which might come from a backup restore and/or a manual 'assets:precompile' command run. +# These duplicates can cause the application to fail, however. +# +rm -f /opt/zammad/public/assets/.sprockets-manifest-*.json || true \ No newline at end of file