mirror of
https://github.com/scylladb/scylladb.git
synced 2026-04-20 16:40:35 +00:00
Drop the AGPL license in favor of a source-available license. See the blog post [1] for details. [1] https://www.scylladb.com/2024/12/18/why-were-moving-to-a-source-available-license/
31 lines
723 B
Python
Executable File
31 lines
723 B
Python
Executable File
#!/usr/bin/env python3
|
|
# -*- coding: utf-8 -*-
|
|
#
|
|
# Copyright 2018-present ScyllaDB
|
|
#
|
|
|
|
#
|
|
# SPDX-License-Identifier: LicenseRef-ScyllaDB-Source-Available-1.0
|
|
|
|
import os
|
|
import sys
|
|
import subprocess
|
|
from scylla_util import *
|
|
from subprocess import run
|
|
|
|
if __name__ == '__main__':
|
|
if os.getuid() > 0:
|
|
print('Requires root permission.')
|
|
sys.exit(1)
|
|
|
|
if not is_redhat_variant():
|
|
print("scylla_selinux_setup only supports Red Hat variants")
|
|
sys.exit(0)
|
|
|
|
res = out('sestatus')
|
|
if res.split(None)[2] != 'disabled':
|
|
run('setenforce 0', shell=True, check=True)
|
|
cfg = sysconfig_parser('/etc/sysconfig/selinux')
|
|
cfg.set('SELINUX', 'disabled')
|
|
cfg.commit()
|