The rc.d script for rsyncd appears to be unable to check the status of the running daemon: ``` # service rsyncd status rsyncd is not running. # cat /var/run/rsync.pid 743 # ps auxww | grep rsync root 743 0.0 0.0 11716 5076 - Is 17:46 0:00.02 /usr/local/bin/rsync --daemon --config /usr/local/etc/rsync/rsyncd.conf # pkg info rsync rsync-3.2.3 Name : rsync Version : 3.2.3 Installed on : Fri Nov 13 17:35:40 2020 UTC Origin : net/rsync Architecture : FreeBSD:11:amd64 # uname -r 11.4-RELEASE-p3 ``` I believe it's because the process name doesn't match the service name. I attempted to fix this by setting $procname in the rc script but it didn't help.
Hi, The status command use the rsync pidfile to locate the running instance of rsync. In file /etc/rc.subr:1070 943 if [ -n "$pidfile" ]; then 944 _pidcmd='rc_pid=$(check_pidfile '"$pidfile $_procname $command_interpreter"')' 945 else 946 _pidcmd='rc_pid=$(check_process '"$_procname $command_interpreter"')' 947 fi ...... 1070 status) 1071 _run_rc_precmd || return 1 1072 if [ -n "$rc_pid" ]; then 1073 echo "${name} is running as pid $rc_pid." 1074 else 1075 echo "${name} is not running." 1076 return 1 1077 fi 1078 _run_rc_postcmd 1079 ;; I did the test in a 12.2-RELEASE and 11.4-RELEASE and in both environments `service rsyncd status` returns the correct status about the service. You can try to debug your environment by making the rc scripts more verbose : add the following line to your rc.conf before checking the status of the rsyncd service rc_debug=YES Without additional information I will close this ticket in the upcoming days. Cheers, -- rodrigo
Thanks for the rc_debug hint. The error was a mismatch between rsyncd.pid and rsync.pid in the rsync.conf file.
Hi Ray So the problem was caused by an existing (miss)configuration ? probably by an older version of the port. I just change the close reason to reflect the real state of the issue. Thanks for your report :) All the best, -- rodrigo