Skip to content

Commit 8200858

Browse files
authored
[backup-files] remove live as default value (#5488)
1 parent b188ec8 commit 8200858

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

stream/backup-files/docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ services:
66
- OPENCTI_URL=http://localhost # Local OpenCTI URL
77
- OPENCTI_TOKEN=ChangeMe # Local OpenCTI token
88
- CONNECTOR_ID=ChangeMe
9-
- CONNECTOR_LIVE_STREAM_ID=live # ID of the live stream created in the OpenCTI UI
9+
- CONNECTOR_LIVE_STREAM_ID=ChangeMe # ID of the live stream created in the OpenCTI UI
1010
- CONNECTOR_LIVE_STREAM_LISTEN_DELETE=true
1111
- CONNECTOR_NAME=BackupFiles
1212
- CONNECTOR_SCOPE=backup

stream/backup-files/src/backup-files.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,12 @@ def round_time(dt, round_to=60):
1717
return dt + datetime.timedelta(0, rounding - seconds, -dt.microsecond)
1818

1919

20+
def check_helper(helper: OpenCTIConnectorHelper) -> None:
21+
if not helper.connect_live_stream_id or helper.connect_live_stream_id == "ChangeMe":
22+
helper.log_error("missing Live Stream ID")
23+
exit(1)
24+
25+
2026
class BackupFilesConnector:
2127
def __init__(self, conf_data):
2228
config_file_path = os.path.dirname(os.path.abspath(__file__)) + "/config.yml"
@@ -26,6 +32,7 @@ def __init__(self, conf_data):
2632
else conf_data
2733
)
2834
self.helper = OpenCTIConnectorHelper(config)
35+
check_helper(self.helper)
2936
# Extra config
3037
self.direct_url = get_config_variable("OPENCTI_URL", ["opencti", "url"], config)
3138
self.backup_protocol = get_config_variable(

stream/backup-files/src/config.yml.sample

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ opencti:
44

55
connector:
66
id: 'ChangeMe'
7-
live_stream_id: 'live' # ID of the live stream created in the OpenCTI UI
7+
live_stream_id: 'ChangeMe' # ID of the live stream created in the OpenCTI UI
88
live_stream_listen_delete: true
99
name: 'BackupFiles'
1010
scope: 'backup'

0 commit comments

Comments
 (0)