From: Jeremy Stanley Date: Sun, 18 Sep 2016 06:25:31 +0000 (+0000) Subject: Rename internal:process to .mudpy.process X-Git-Tag: 0.0.1~179 X-Git-Url: https://mudpy.org/gitweb?a=commitdiff_plain;h=4708e5ad2215bce4806578c9417a09ceccef0292;p=mudpy.git Rename internal:process to .mudpy.process Convert the old style internal:process element to a new style .mudpy.process element and adjust the daemonize(), create_pidfile() and remove_pidfile() functions accordingly. --- diff --git a/etc/mudpy.yaml b/etc/mudpy.yaml index aaf3db7..672cf4f 100644 --- a/etc/mudpy.yaml +++ b/etc/mudpy.yaml @@ -45,9 +45,8 @@ __control__: .mudpy.network.host: '::1' .mudpy.network.port: 6669 -internal:process: - #daemon: yes - #pidfile: mudpy.pid +#.mudpy.process.daemon: true +#.mudpy.process.pidfile: mudpy.pid internal:storage: default_dir: "data" diff --git a/lib/mudpy/misc.py b/lib/mudpy/misc.py index 02f2fba..6c720d5 100644 --- a/lib/mudpy/misc.py +++ b/lib/mudpy/misc.py @@ -2312,7 +2312,7 @@ def daemonize(universe): """Fork and disassociate from everything.""" # only if this is what we're configured to do - if universe.contents["internal:process"].get("daemon"): + if universe.contents["mudpy.process"].get("daemon"): # log before we start forking around, so the terminal gets the message log("Disassociating from the controlling terminal.") @@ -2349,7 +2349,7 @@ def create_pidfile(universe): """Write a file containing the current process ID.""" pid = str(os.getpid()) log("Process ID: " + pid) - file_name = universe.contents["internal:process"].get("pidfile") + file_name = universe.contents["mudpy.process"].get("pidfile") if file_name: if not os.path.isabs(file_name): file_name = os.path.join(universe.startdir, file_name) @@ -2361,7 +2361,7 @@ def create_pidfile(universe): def remove_pidfile(universe): """Remove the file containing the current process ID.""" - file_name = universe.contents["internal:process"].get("pidfile") + file_name = universe.contents["mudpy.process"].get("pidfile") if file_name: if not os.path.isabs(file_name): file_name = os.path.join(universe.startdir, file_name)