Browse Source

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
Roman Prykhodchenko 3 years ago
parent
commit
83e764260f
1 changed files with 2 additions and 1 deletions
  1. 2
    1
      fuel_plugin_builder/templates/v3/build/plugin_rpm.spec.mako

+ 2
- 1
fuel_plugin_builder/templates/v3/build/plugin_rpm.spec.mako View File

@@ -48,10 +48,11 @@ ${ postinstall_hook }
48 48
 # install:      (N/A)
49 49
 # upgrade:      1
50 50
 # uninstall:    0
51
+% if uninstall_hook:
51 52
 if [ $1 -eq 0 ]; then
52 53
     ${ uninstall_hook }
53 54
 fi
54
-
55
+% endif
55 56
 
56 57
 %%files
57 58
 /var/www/nailgun/plugins/${ name }

Loading…
Cancel
Save