remove work directory after package upgrade, see #923

This commit is contained in:
Sebastian Sdorra
2017-06-25 13:46:39 +02:00
parent 07a1c8b151
commit 73cfbe8993
2 changed files with 10 additions and 0 deletions

View File

@@ -205,6 +205,7 @@
</platform>
<scripts>
<preInstall>${project.basedir}/src/main/nativepkg/create-user</preInstall>
<postInstall>${project.basedir}/src/main/nativepkg/clear-cache</postInstall>
</scripts>
<mappings>
<files>

View File

@@ -0,0 +1,9 @@
#!/bin/sh
# clear workdir after upgrade
# https://bitbucket.org/sdorra/scm-manager/issues/923/scmmanager-installed-from-debian-package
WORKDIR="/var/cache/scm/work/webapp"
if [ -d "${WORKDIR}" ]; then
rm -rf "${WORKDIR}"
fi