You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
791 B

  1. --- a/controller/seafile-controller.c
  2. +++ b/controller/seafile-controller.c
  3. @@ -21,7 +21,7 @@
  4. SeafileController *ctl;
  5. -static char *controller_pidfile = NULL;
  6. +static char *controller_pidfile = "/var/run/seafile/seafile-controller.pid";
  7. char *bin_dir = NULL;
  8. char *installpath = NULL;
  9. @@ -591,9 +591,9 @@ stop_ccnet_server ()
  10. static void
  11. init_pidfile_path (SeafileController *ctl)
  12. {
  13. - char *pid_dir = g_build_filename (topdir, "pids", NULL);
  14. + char *pid_dir = g_path_get_dirname (controller_pidfile);
  15. if (!g_file_test(pid_dir, G_FILE_TEST_EXISTS)) {
  16. - if (g_mkdir(pid_dir, 0777) < 0) {
  17. + if (g_mkdir(pid_dir, 0755) < 0) {
  18. seaf_warning("failed to create pid dir %s: %s", pid_dir, strerror(errno));
  19. controller_exit(1);
  20. }