You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/sys-cluster/slurm/files/slurmd.initd

47 lines
1.1 KiB

#!/sbin/runscript
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/sys-cluster/slurm/files/slurmd.initd,v 1.3 2011/07/04 10:15:30 alexxy Exp $
opts="reload"
[[ -f /etc/conf.d/slurm ]] && . /etc/conf.d/slurm
depend() {
local _need="net"
[[ ${SLURM_USE_MUNGE} -ne 0 ]] && _need="${_need} munged"
after logger
need ${_need}
}
checkconfig() {
if [ ! -e "/etc/slurm/slurm.conf" ]; then
eerror "Missing config /etc/slurm/slurm.conf"
eerror "Customize sample one or generate new by configurator.html"
eerror "in slurm doc directory"
return 1
fi
}
start() {
ebegin "Starting slurm daemon"
start-stop-daemon --start --quiet --background \
--pidfile /var/run/slurm/slurmd.pid \
--user root \
--group root \
--exec /usr/sbin/slurmd -- ${SLURMD_OPTS}
eend $?
}
stop() {
ebegin "Stopping slurm daemon"
start-stop-daemon --stop --pidfile /var/run/slurm/slurmd.pid
eend $?
}
reload() {
ebegin "Reloading slurm daemon configuration"
start-stop-daemon --signal HUP --pidfile /var/run/slurm/slurmd.pid
eend $?
}