summarylogtreecommitdiffstats
path: root/service
blob: fdb66f164fc427bf8859f9babd072a859fe8bf7f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/bash

#
# wrapper around systemctl used by Xerox driver.
#
# Xerox's xeroxprtmgr invokes 'service cups restart', which will fail on systemd systems. This script "translates" the
# service invocation to a systemctl invocation.
#

set -e

SERVICE=$1
COMMAND=$2

if [ $SERVICE == "cups" ]; then
	SERVICE=org.cups.cupsd.service
else
	SERVICE=$SERVICE.service
fi

echo "systemctl $COMMAND $SERVICE"

systemctl $COMMAND $SERVICE