use systemctl for service restart
Change-Id: Iddc2b37bd90aa9393840f3761ea0341922961146
Related-Prod: PROD-33610
diff --git a/ceph/files/backup/ceph-backup-client-runner.sh b/ceph/files/backup/ceph-backup-client-runner.sh
index 4b5b4f9..bb04fc6 100644
--- a/ceph/files/backup/ceph-backup-client-runner.sh
+++ b/ceph/files/backup/ceph-backup-client-runner.sh
@@ -45,11 +45,11 @@
rsync -arv --exclude=osd/{{ common.get('cluster_name', 'ceph') }}-*/current /var/lib/ceph $TMPDIR/{{ common.get('cluster_name', 'ceph') }}-$HOSTNAME/
{%- elif mon.get('enabled', False) %}
cp -a /etc/ceph/ $TMPDIR/
- if service ceph-mon@$HOSTNAME status >/dev/null; then
- service ceph-mon@$HOSTNAME stop
+ if systemctl status ceph-mon@$HOSTNAME >/dev/null; then
+ systemctl stop ceph-mon@$HOSTNAME
cp -a /var/lib/ceph/ $TMPDIR/{{ common.get('cluster_name', 'ceph') }}-$HOSTNAME/
- service ceph-mon@$HOSTNAME start
- else
+ systemctl start ceph-mon@$HOSTNAME
+ else
cp -a /var/lib/ceph/ $TMPDIR/{{ common.get('cluster_name', 'ceph') }}-$HOSTNAME/
fi
{%- endif %}