summaryrefslogtreecommitdiffstats
path: root/src/service/util/serviceutil.sh
diff options
context:
space:
mode:
Diffstat (limited to 'src/service/util/serviceutil.sh')
-rwxr-xr-xsrc/service/util/serviceutil.sh28
1 files changed, 15 insertions, 13 deletions
diff --git a/src/service/util/serviceutil.sh b/src/service/util/serviceutil.sh
index bcfcf46..5c26651 100755
--- a/src/service/util/serviceutil.sh
+++ b/src/service/util/serviceutil.sh
@@ -2,22 +2,24 @@
#
# serviceutil.sh
#
-# Copyright (C) 2012 Vitezslav Crhonek <vcrhonek@redhat.com>
+# Copyright (C) 2012 Red Hat, Inc. All rights reserved.
#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation; either version 2
-# of the License, or (at your option) any later version.
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
#
-# This program is distributed in the hope that it will be useful,
+# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, see <http://www.gnu.org/licenses/>.
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+#
+# Authors: Vitezslav Crhonek <vcrhonek@redhat.com>
#
-
# path to systemd service directory
SYSTEMD_SDIR=/lib/systemd/system
@@ -30,10 +32,10 @@ if [ -f $SYSTEMD_SDIR/$SUNIT_NAME ];
then
case "$1" in
start|stop|reload|restart|try-restart|condrestart|reload-or-restart|reload-or-try-restart|enable|disable|is-enabled)
- systemctl $1 $SUNIT_NAME
+ systemctl -- $1 $SUNIT_NAME
;;
status)
- output=`systemctl status $SUNIT_NAME`
+ output=`systemctl -- status $SUNIT_NAME`
if echo "$output" | grep Active: | grep inactive > /dev/null 2>&1; then
echo "stopped"
elif echo "$output" | grep Active: | grep failed > /dev/null 2>&1; then