summaryrefslogtreecommitdiffstats
path: root/geo-replication/syncdaemon/gconf.py
blob: 146c72a182560eb2d78a1cc1b53f9246b8aed901 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
import os

class GConf(object):
    """singleton class to store globals
       shared between gsyncd modules"""

    ssh_ctl_dir = None
    ssh_ctl_args = None
    cpid = None
    pid_file_owned = False
    log_exit = False
    permanent_handles = []
    log_metadata = {}

    @classmethod
    def setup_ssh_ctl(cls, ctld):
        cls.ssh_ctl_dir = ctld
        cls.ssh_ctl_args = ["-oControlMaster=auto", "-S", os.path.join(ctld, "gsycnd-ssh-%r@%h:%p")]

gconf = GConf()