postinstall.sh revision ff9ebc9ed4e9593360309eac406b1d021fa4d865
893N/A# The contents of this file are subject to the terms of the 893N/A# Common Development and Distribution License, Version 1.0 only 893N/A# (the "License"). You may not use this file except in compliance 893N/A# See the License for the specific language governing permissions 893N/A# and limitations under the License. 2362N/A# When distributing Covered Code, include this CDDL HEADER in each 893N/A# file and include the License file at 893N/A# add the following below this CDDL HEADER, with the fields enclosed 893N/A# by brackets "[]" replaced with your own identifying information: 893N/A# Portions Copyright [yyyy] [name of copyright owner] 893N/A# Copyright 2013-2015 ForgeRock AS. 893N/A# =============================== 893N/A# RPM Post Install Script (%post) 893N/A# =============================== 893N/A# The arguments to a %post are 1 and 2 for a new installation 893N/A# and upgrade, respectively. (%pre and %post aren't executed during 893N/A# Symlinks to process ID 893N/Aif [
"$1" ==
"1" ] ;
then 893N/A echo "Post Install - initial install" 893N/Aelse if [
"$1" ==
"2" ] ;
then 893N/A echo "Post Install - upgrade install" 893N/A # Only if the instance has been configured 893N/A # If upgrade is ok, checks the server status flag for restart 893N/A echo "Restarting server..." 893N/A # Upgrade fails, needs user interaction (eg. manual mode) 893N/A if [
"$?" ==
"2" ] ;
then 893N/A echo "Instance is not configured. Upgrade aborted."