Allow optional uninstall.sh

Don't put any code to PREUN scripts if uninstall.sh
does not exist or is empty.

Closes-bug: #1574478
Change-Id: Ie7767e285b8086921a944da4bea9aa9749a0e323
This commit is contained in:
Roman Prykhodchenko 2016-04-26 16:54:14 +02:00
parent 6dc5c22149
commit 83e764260f
1 changed files with 2 additions and 1 deletions

View File

@ -48,10 +48,11 @@ ${ postinstall_hook }
# install: (N/A)
# upgrade: 1
# uninstall: 0
% if uninstall_hook:
if [ $1 -eq 0 ]; then
${ uninstall_hook }
fi
% endif
%%files
/var/www/nailgun/plugins/${ name }