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.

24 lines
1.0 KiB

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