diff options
author | Nicholas Marriott <nicholas.marriott@gmail.com> | 2009-07-14 06:38:14 +0000 |
---|---|---|
committer | Nicholas Marriott <nicholas.marriott@gmail.com> | 2009-07-14 06:38:14 +0000 |
commit | d2c3dbc665367ae391ea52828ac1c6007097380a (patch) | |
tree | f79cbc82b2355205ae44ddfae4b658ce98369263 /server.c | |
parent | 2f75b07d08e68e6173a06fd120e0684d51e29db3 (diff) | |
download | rtmux-d2c3dbc665367ae391ea52828ac1c6007097380a.tar.gz rtmux-d2c3dbc665367ae391ea52828ac1c6007097380a.tar.bz2 rtmux-d2c3dbc665367ae391ea52828ac1c6007097380a.zip |
If it exist, load a system-wide configuration file /etc/tmux.conf before any
user-specified one.
Diffstat (limited to 'server.c')
-rw-r--r-- | server.c | 13 |
1 files changed, 12 insertions, 1 deletions
@@ -1,4 +1,4 @@ -/* $Id: server.c,v 1.155 2009-07-08 18:03:03 nicm Exp $ */ +/* $Id: server.c,v 1.156 2009-07-14 06:38:14 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -172,6 +172,17 @@ server_start(char *path) start_time = time(NULL); socket_path = path; + if (access(SYSTEM_CFG, R_OK) != 0) { + if (errno != ENOENT) { + log_warn("%s", SYSTEM_CFG); + exit(1); + } + } else { + if (load_cfg(SYSTEM_CFG, &cause) != 0) { + log_warnx("%s", cause); + exit(1); + } + } if (cfg_file != NULL && load_cfg(cfg_file, &cause) != 0) { log_warnx("%s", cause); exit(1); |