summaryrefslogtreecommitdiffstats
path: root/bin/cephfs-snap
diff options
context:
space:
mode:
Diffstat (limited to 'bin/cephfs-snap')
-rwxr-xr-xbin/cephfs-snap14
1 files changed, 7 insertions, 7 deletions
diff --git a/bin/cephfs-snap b/bin/cephfs-snap
index d6bb96d..5d20726 100755
--- a/bin/cephfs-snap
+++ b/bin/cephfs-snap
@@ -1,7 +1,6 @@
#!/bin/sh
-# storage-tools - Additional utilities to manage storage related tasks
-# Copyright (C) 2014-2017 Daniel Baumann <daniel.baumann@open-infrastructure.net>
+# Copyright (C) 2014-2019 Daniel Baumann <daniel.baumann@open-infrastructure.net>
#
# SPDX-License-Identifier: GPL-3.0+
#
@@ -20,6 +19,7 @@
set -e
+PROJECT="open-infrastructure"
SOFTWARE="storage-tools"
PROGRAM="cephfs-snap"
@@ -31,9 +31,9 @@ Usage ()
exit 1
}
-if [ -e "/etc/default/${SOFTWARE}" ]
+if [ -e "/etc/${PROJECT}/ceph-tools.conf" ]
then
- . "/etc/default/${SOFTWARE}"
+ . "/etc/${PROJECT}/ceph-tools.conf"
fi
case "${CEPHFS_SNAP}" in
@@ -47,7 +47,7 @@ esac
if [ -z "${CEPHFS_SNAP_DIRECTORIES}" ]
then
- echo "E: no cephfs directories defined in /etc/default/${SOFTWARE}" >&2
+ echo "E: no cephfs directories defined in /etc/${PROJECT}/ceph-tools.conf" >&2
exit 1
fi
@@ -57,7 +57,7 @@ case "${ACTION}" in
if [ -z "${ROTATION}" ]
then
- echo "E: no cephfs snapshot rotation for ${ACTION} defined in /etc/default/${SOFTWARE}" >&2
+ echo "E: no cephfs snapshot rotation for ${ACTION} defined in /etc/${PROJECT}/ceph-tools.conf" >&2
exit 1
fi
;;
@@ -106,7 +106,7 @@ mkdir -p "/var/log/${SOFTWARE}/${PROGRAM}"
echo "${DATE} ${HOST} ${PROGRAM} creating ${ACTION} snapshots" >> "/var/log/${SOFTWARE}/${PROGRAM}/${PROGRAM}.log"
# irc
-if [ -e /usr/bin/irk ] && [ -e "/etc/default/${SOFTWARE}" ]
+if [ -e /usr/bin/irk ] && [ -e "/etc/${PROJECT}/ceph-tools.conf" ]
then
if [ -n "${IRK_TARGETS}" ]
then