On 5/19/2017 5:05 PM, Chetas Joshi wrote:
> If I don't wanna upgrade and there is an already installed service, why
> should it be exit 1 and not exit 0? Shouldn't it be like....
>
> if [ ! "$SOLR_UPGRADE" = "YES" ]; then
>
>   if [ -f "/etc/init.d/$SOLR_SERVICE" ]; then
>
>     print_usage "/etc/init.d/$SOLR_SERVICE already exists! Perhaps Solr is
> already setup as a service on this host? To upgrade Solr use the -f option."
>
>     *exit 0*
>
>   fi

When the script reaches this point, the installation has failed, because
the service already exists and the script wasn't asked to upgrade it. 
That is why it exits with a value of 1.  If it were to exit with 0,
whatever called the script would assume that the installation was
successful -- which is not what has happened.

Why are you installing Solr again when it is already installed?

Thanks,
Shawn

Reply via email to