blob: 3419ddbe1d1e13d596362f354207f4ef004a2c7b (
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=cups.service
else
SERVICE=$SERVICE.service
fi
echo "systemctl $COMMAND $SERVICE"
systemctl $COMMAND $SERVICE
|