]> git.tuebingen.mpg.de Git - paraslash.git/blobdiff - server.c
manual: Move /var/paraslash instructions to Troubleshooting.
[paraslash.git] / server.c
index fc81b9440150f886af47b97ce77878f937959344..6c2cbb8758bc5f98e12ca69198ebfb069c595e77 100644 (file)
--- a/server.c
+++ b/server.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 1997-2014 Andre Noll <maan@tuebingen.mpg.de>
+ * Copyright (C) 1997 Andre Noll <maan@tuebingen.mpg.de>
  *
  * Licensed under the GPL v2. For licencing details see COPYING.
  */
@@ -126,29 +126,6 @@ char *server_get_tasks(void)
        return get_task_list(&sched);
 }
 
-static int want_colors(void)
-{
-       if (conf.color_arg == color_arg_no)
-               return 0;
-       if (conf.color_arg == color_arg_yes)
-               return 1;
-       if (conf.logfile_given)
-               return 0;
-       return isatty(STDERR_FILENO);
-}
-
-static void init_colors_or_die(void)
-{
-       int i;
-
-       if (!want_colors())
-               return;
-       daemon_set_flag(DF_COLOR_LOG);
-       daemon_set_default_log_colors();
-       for (i = 0; i < conf.log_color_given; i++)
-               daemon_set_log_color_or_die(conf.log_color_arg[i]);
-}
-
 /*
  * setup shared memory area and get mutex for locking
  */
@@ -231,7 +208,9 @@ void parse_config_or_die(int override)
                daemon_set_logfile(conf.logfile_arg);
                daemon_open_log_or_die();
        }
-       init_colors_or_die();
+
+       daemon_init_colors_or_die(conf.color_arg, color_arg_auto, color_arg_no,
+               conf.logfile_given, conf.log_color_arg, conf.log_color_given);
        daemon_set_flag(DF_LOG_PID);
        daemon_set_flag(DF_LOG_LL);
        daemon_set_flag(DF_LOG_TIME);