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