Skip to content
Permalink
master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
executable file 39 lines (23 sloc) 601 Bytes
#!/bin/bash
#set -x
dnsdomain=molgen.mpg.de
systemdsystemdir=/etc/systemd/system
mxstartupprefix=mxstartup
unittype=.service
hostname=$(uname -n)
shorthostname=${hostname%\.${dnsdomain}}
searchunits=${systemdsystemdir}/${mxstartupprefix}-${shorthostname}-*${unittype}
units=
shopt -s nullglob
for i in ${searchunits} ; do
units="${units+${units} }${i##*/}"
done
if [ -z "${units}" ] ; then
echo >&2 "mxstartup: nothing to start on host '${shorthostname}'"
exit 0
fi
cmd=status
if [ "${1}" = "start" -o "${1}" = "stop" ] ; then
cmd=${1}
fi
exec systemctl ${cmd} ${units}