Repository: qpid-dispatch Updated Branches: refs/heads/master eaa8901c7 -> 470aafbe6
DISPATCH-864 - Removed cmake flags SYSTEMD and SYSVINIT introduced in DISPATCH-859. Moved qdrouterd.service file to etc/fedora. Also added a minor improvement to qdrouterd file (adds more choices). Thanks to Justin Ross for the patch Project: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/repo Commit: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/commit/470aafbe Tree: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/tree/470aafbe Diff: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/diff/470aafbe Branch: refs/heads/master Commit: 470aafbe6ffc4e5b77c46413b704e429f3ec3d2c Parents: eaa8901 Author: Ganesh Murthy <gmur...@redhat.com> Authored: Wed Nov 1 12:04:14 2017 -0400 Committer: Ganesh Murthy <gmur...@redhat.com> Committed: Wed Nov 1 12:04:14 2017 -0400 ---------------------------------------------------------------------- CMakeLists.txt | 14 -------------- etc/fedora/qdrouterd.service | 31 +++++++++++++++++++++++++++++++ etc/qdrouterd | 7 ++++++- etc/qdrouterd.service | 31 ------------------------------- 4 files changed, 37 insertions(+), 46 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/470aafbe/CMakeLists.txt ---------------------------------------------------------------------- diff --git a/CMakeLists.txt b/CMakeLists.txt index 7ee16cb..9c9aa2a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -31,8 +31,6 @@ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake") # Build time switch to turn off memory pooling. option(USE_MEMORY_POOL "Use per-thread memory pools" ON) option(QD_MEMORY_STATS "Track memory pool usage statistics" ON) -option(SYSTEMD "Install systemd compatible startup script" OFF) -option(SYSVINIT "Install sysvinit compatible startup script" OFF) file(STRINGS "${CMAKE_SOURCE_DIR}/VERSION.txt" QPID_DISPATCH_VERSION) @@ -191,18 +189,6 @@ install(FILES README DESTINATION ${QD_DOC_INSTALL_DIR}) -# SYSTEMD or SYSVINIT -if(SYSTEMD AND SYSVINIT) - message(FATAL_ERROR "Both SYSTEMD and SYSVINIT are set to ON. Only one can be set to ON") -endif() -if(SYSTEMD) - install(FILES etc/qdrouterd.service DESTINATION ${SYSCONF_INSTALL_DIR}/qpid-dispatch) -endif(SYSTEMD) -if(SYSVINIT) - install(FILES etc/qdrouterd DESTINATION ${SYSCONF_INSTALL_DIR}/qpid-dispatch) -endif(SYSVINIT) - - add_subdirectory(src) # Build src first so other subdirs can use QPID_DISPATCH_LIB # run.py environment runner script - needs QPID_DISPATCH_LIB http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/470aafbe/etc/fedora/qdrouterd.service ---------------------------------------------------------------------- diff --git a/etc/fedora/qdrouterd.service b/etc/fedora/qdrouterd.service new file mode 100644 index 0000000..1892043 --- /dev/null +++ b/etc/fedora/qdrouterd.service @@ -0,0 +1,31 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License +# +[Unit] +Description=Qpid Dispatch router daemon +Requires=network.target +After=network.target + +[Service] +User=qdrouterd +Group=qdrouterd +Type=simple +ExecStart=/usr/sbin/qdrouterd -c /etc/qpid-dispatch/qdrouterd.conf + +[Install] +WantedBy=multi-user.target http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/470aafbe/etc/qdrouterd ---------------------------------------------------------------------- diff --git a/etc/qdrouterd b/etc/qdrouterd index b0647e3..d7d568a 100644 --- a/etc/qdrouterd +++ b/etc/qdrouterd @@ -88,12 +88,17 @@ case "$1" in RETVAL=$? ;; + try-restart|condrestart) + status $prog + if [ "$?" -eq "0" ]; then restart; fi + ;; + reload|force-reload) exit 3 # Not implemented ;; *) - echo "Usage: $0 {start|stop|status|restart|reload|force-reload}" + echo "Usage: $0 {start|stop|status|restart|reload|try-restart|condrestart|force-reload}" exit 2 # Invalid arguments ;; esac http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/470aafbe/etc/qdrouterd.service ---------------------------------------------------------------------- diff --git a/etc/qdrouterd.service b/etc/qdrouterd.service deleted file mode 100644 index 1892043..0000000 --- a/etc/qdrouterd.service +++ /dev/null @@ -1,31 +0,0 @@ -# -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License -# -[Unit] -Description=Qpid Dispatch router daemon -Requires=network.target -After=network.target - -[Service] -User=qdrouterd -Group=qdrouterd -Type=simple -ExecStart=/usr/sbin/qdrouterd -c /etc/qpid-dispatch/qdrouterd.conf - -[Install] -WantedBy=multi-user.target --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@qpid.apache.org For additional commands, e-mail: commits-h...@qpid.apache.org