diff options
author | amid | 2022-03-24 01:31:46 +0600 |
---|---|---|
committer | amid | 2022-03-24 01:31:46 +0600 |
commit | 1b42f930370f380ccd0aba50f23680b22ca5c927 (patch) | |
tree | c9b5f7dd4f90df493cccaac3ac02478d96a2df2c /service | |
download | aur-xerox-office-prtdrv.tar.gz |
Initial commit
Diffstat (limited to 'service')
-rwxr-xr-x | service | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/service b/service new file mode 100755 index 000000000000..3419ddbe1d1e --- /dev/null +++ b/service @@ -0,0 +1,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 |