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

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