g4klx / MMDVMHost

The host program for the MMDVM
GNU General Public License v2.0
378 stars 274 forks source link

MMDVMHost: unable to open the log file #816

Open alex-v-fraser opened 2 months ago

alex-v-fraser commented 2 months ago

Hello!

I try to install MMDVMHost into Synology Virtual Machine. First I install Debian 12 (clean install). Then I make MMDVMHost I get the same error every time I try to start MMDVMHost: unable to open the log file I tried to start from bash and as service - the same result. I tried i386, amd64 - the same error. My system is:

$ uname -a
Linux mmdvm 6.1.0-25-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.106-3 (2024-08-26) x86_64 GNU/Linux

My config is: the file /usr/local/sbin/mmdvmhost_service (only changed strings)

# Service Config
DAEMON=MMDVMHost
DAEMON_PATH=/opt/MMDVMHost
CONFIG=/opt/MMDVMHost/MMDVM.ini
DAEMON_OPTS=$CONFIG
PGREP=/usr/bin/pgrep
KILL=/bin/kill
SLEEP=/bin/sleep
USER=root
GROUP=root
LOGDIR=/var/log/pi-star

the file /lib/systemd/system/mmdvmhost.service

[Unit]
Description=MMDVMHost Radio Servce
After=syslog.target network.target

[Service]
Type=forking
ExecStart=/usr/local/sbin/mmdvmhost_service start
ExecStop=/usr/local/sbin/mmdvmhost_service stop
ExecReload=/usr/local/sbin/mmdvmhost_service restart

[Install]
WantedBy=multi-user.target

In MMDVM.ini I didn't make any changes in LOG

[Log]
# Logging levels, 0=No logging
DisplayLevel=1
FileLevel=1
FilePath=.
FileRoot=MMDVM
FileRotate=1

Will you help me please?

g4klx commented 2 months ago

You need to tell the program where to write the log file. It's specified on the configuration line FIlePath in the [Log] section. Wherever you have it written, you must have write permissions.

alex-v-fraser commented 2 months ago

@g4klx I suppose FilePath=. means the directory the program runs from. And it runs as root. What permissions does it require?

g4klx commented 2 months ago

You are right, a single dot means the current directory, whatever that is. If it runs as root then it should be able to write anywhere, but it doesn't seem so. I cannot help with your running environment, you need to ask somewhere that discusses it specifically.