postinst revision 6294
0a99555401a033704f1f171baab6db11fb5528f2Allan Foster# Post install script
0a99555401a033704f1f171baab6db11fb5528f2Allan Foster# Install is launched with an empty second arg.
0a99555401a033704f1f171baab6db11fb5528f2Allan Foster# If the package is already installed,
0a99555401a033704f1f171baab6db11fb5528f2Allan Foster# the second arg. is not empty.
0a99555401a033704f1f171baab6db11fb5528f2Allan Foster# In this case, we are in upgrade mode.
0a99555401a033704f1f171baab6db11fb5528f2Allan Foster# For being secure, we check the buildinfo file too.
0a99555401a033704f1f171baab6db11fb5528f2Allan Foster# Upgrade fails - Requires mandatory user interaction.
0a99555401a033704f1f171baab6db11fb5528f2Allan Foster# Nevertheless, exits successfully of the pkg process.
0a99555401a033704f1f171baab6db11fb5528f2Allan Foster# Restarts the service if needed.
0a99555401a033704f1f171baab6db11fb5528f2Allan Foster# If server is stopped by upgrade process,
0a99555401a033704f1f171baab6db11fb5528f2Allan Foster# the server will restart after upgrade.
0a99555401a033704f1f171baab6db11fb5528f2Allan Foster# If server is stopped before the upgrade process
0a99555401a033704f1f171baab6db11fb5528f2Allan Foster# (eg. upgrade the new package), the server will not restart.
0a99555401a033704f1f171baab6db11fb5528f2Allan Foster# Uses the flag for determining server status at this point.
0a99555401a033704f1f171baab6db11fb5528f2Allan Foster echo "*Restarting server..."
0a99555401a033704f1f171baab6db11fb5528f2Allan Foster# Invalid installation, could not find the buildinfo file.
0a99555401a033704f1f171baab6db11fb5528f2Allan Foster echo "Invalid installation, could not find the build info file."
0a99555401a033704f1f171baab6db11fb5528f2Allan Foster# End post install script