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

--- a/controller/seafile-controller.c
+++ b/controller/seafile-controller.c
@@ -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;
@@ -591,9 +591,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);
}