This makes it possible to save pidfile in /var/run/chrony.
/* Check whether another chronyd may already be running */
check_pidfile();
- /* Write our pidfile to prevent other chronyds running */
- write_pidfile();
-
if (!user)
user = CNF_GetUser();
/* Create directories for sockets, log files, and dump files */
CNF_CreateDirs(pw->pw_uid, pw->pw_gid);
+ /* Write our pidfile to prevent other instances from running */
+ write_pidfile();
+
PRV_Initialise();
LCL_Initialise();
SCH_Initialise();