diff options
author | Nicholas Marriott <nicm@openbsd.org> | 2009-07-12 16:07:56 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@openbsd.org> | 2009-07-12 16:07:56 +0000 |
commit | 22355ce947da7acd8863d7f7a467324ad030faec (patch) | |
tree | 4f5a938c5136309ee24c945a133150632bc01942 /server.c | |
parent | bd098c273b6a8ac6a0d493194cacd2e231bbeefe (diff) | |
download | rtmux-22355ce947da7acd8863d7f7a467324ad030faec.tar.gz rtmux-22355ce947da7acd8863d7f7a467324ad030faec.tar.bz2 rtmux-22355ce947da7acd8863d7f7a467324ad030faec.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 | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -171,6 +171,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); |