set -e
# Post install script
# Install is launched with an empty second arg.
# If the package is already installed,
# the second arg. is not empty.
# Registers the service
# Symlinks to process ID
# In this case, we are in upgrade mode.
if [ "$1" = "configure" ] && [ ! -z "$2" ]
then
# For being secure, we check the buildinfo file too.
then
echo
# Upgrade fails - Requires mandatory user interaction.
# Nevertheless, exits successfully of the pkg process.
then
exit 0
fi
# Restarts the service if needed.
# If server is stopped by upgrade process,
# the server will restart after upgrade.
# If server is stopped before the upgrade process
# (eg. upgrade the new package), the server will not restart.
# Uses the flag for determining server status at this point.
then
then
echo
echo "*Restarting server..."
fi
fi
else
# Invalid installation, could not find the buildinfo file.
echo "Invalid installation, could not find the build info file."
exit -1
fi
fi
# End post install script
echo