You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@solr.apache.org by GitBox <gi...@apache.org> on 2021/11/23 20:45:50 UTC

[GitHub] [solr] janhoy commented on a change in pull request #428: SOLR-14410: switch from SysV to systemd service

janhoy commented on a change in pull request #428:
URL: https://github.com/apache/solr/pull/428#discussion_r755487160



##########
File path: solr/bin/install_solr_service.sh
##########
@@ -352,19 +357,13 @@ find "$SOLR_VAR_DIR" -type d -print0 | xargs -0 chmod 0750
 find "$SOLR_VAR_DIR" -type f -print0 | xargs -0 chmod 0640
 
 # configure autostart of service
-if [[ "$distro" == "RedHat" || "$distro" == "CentOS" || "$distro" == "SUSE" ]]; then
-  chkconfig "$SOLR_SERVICE" on
-else
-  update-rc.d "$SOLR_SERVICE" defaults
-fi
+systemctl enable "$SOLR_SERVICE.service"
 echo "Service $SOLR_SERVICE installed."
 echo "Customize Solr startup configuration in /etc/default/$SOLR_SERVICE.in.sh"
 
 # start service
 if [[ $SOLR_START == "true" ]] ; then
-  service "$SOLR_SERVICE" start
-  sleep 5
-  service "$SOLR_SERVICE" status
+  systemctl start "$SOLR_SERVICE.service"
 else
-  echo "Not starting Solr service (option -n given). Start manually with 'service $SOLR_SERVICE start'"
+  echo "Not starting Solr service (option -n given). Start manually with 'systemctl start $SOLR_SERVICE.service'"

Review comment:
       No need for `.service` here I guess?

##########
File path: solr/solr-ref-guide/src/taking-solr-to-production.adoc
##########
@@ -472,6 +463,6 @@ After installing the solr2 service, verify it works correctly by doing:
 
 [source,bash]
 ----
-sudo service solr2 restart
-sudo service solr2 status
+sudo systemctl start solr2

Review comment:
       The original example used `restart`, any reason you chose 'start' here?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org