blob: d1da9b443c117633ed56340fb4ae1c6d33047c05 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
|
From 25fca1f9b33e3a86d202e044862d7e962d77c215 Mon Sep 17 00:00:00 2001
From: Ultrabug <ultrabug@gentoo.org>
Date: Wed, 3 May 2017 17:27:36 +0200
Subject: [PATCH 10/13] scylla_setup: refactor scylla-server service setup
while adding gentoo linux openrc support
---
dist/common/scripts/scylla_setup | 28 +++++++++++++---------------
1 file changed, 13 insertions(+), 15 deletions(-)
diff --git a/dist/common/scripts/scylla_setup b/dist/common/scripts/scylla_setup
index 17bbef84..9078f4df 100755
--- a/dist/common/scripts/scylla_setup
+++ b/dist/common/scripts/scylla_setup
@@ -271,29 +271,27 @@ if [ $ENABLE_SERVICE -eq 1 ]; then
if is_systemd; then
systemctl enable scylla-server.service
systemctl enable collectd.service
- fi
- if [ $INTERACTIVE -eq 1 ] && [ ! -f /etc/scylla.d/housekeeping.cfg ]; then
- interactive_ask_service "Do you want to enable ScyllaDB version check?" "Answer yes to automatically start Scylla-housekeeping service that checks for a newer version periodically; answer no to skip this step." "yes" &&:
- ENABLE_CHECK_VERSION=$?
- fi
- if [ $ENABLE_CHECK_VERSION -eq 1 ]; then
- if [ ! -f /etc/scylla.d/housekeeping.cfg ]; then
- printf "[housekeeping]\ncheck-version: True\n" > /etc/scylla.d/housekeeping.cfg
+ if [ $INTERACTIVE -eq 1 ] && [ ! -f /etc/scylla.d/housekeeping.cfg ]; then
+ interactive_ask_service "Do you want to enable ScyllaDB version check?" "Answer yes to automatically start Scylla-housekeeping service that checks for a newer version periodically; answer no to skip this step." "yes" &&:
+ ENABLE_CHECK_VERSION=$?
fi
- if is_systemd; then
+ if [ $ENABLE_CHECK_VERSION -eq 1 ]; then
+ if [ ! -f /etc/scylla.d/housekeeping.cfg ]; then
+ printf "[housekeeping]\ncheck-version: True\n" > /etc/scylla.d/housekeeping.cfg
+ fi
systemctl unmask scylla-housekeeping-daily.timer
systemctl unmask scylla-housekeeping-restart.timer
- fi
- else
- if [ ! -f /etc/scylla.d/housekeeping.cfg ]; then
- printf "[housekeeping]\ncheck-version: False\n" > /etc/scylla.d/housekeeping.cfg
- fi
- if is_systemd; then
+ else
+ if [ ! -f /etc/scylla.d/housekeeping.cfg ]; then
+ printf "[housekeeping]\ncheck-version: False\n" > /etc/scylla.d/housekeeping.cfg
+ fi
systemctl mask scylla-housekeeping-daily.timer
systemctl mask scylla-housekeeping-restart.timer
systemctl stop scylla-housekeeping-daily.timer || true
systemctl stop scylla-housekeeping-restart.timer || true
fi
+ elif is_gentoo_variant; then
+ rc-update add scylla-server default
fi
fi
--
2.12.2
|