-1

I see that my raspbian is running the transmission-daemon.service is running with the log parameter-

pi@raspberrypi:~ $ sudo systemctl status transmission-daemon.service
● transmission-daemon.service - Transmission BitTorrent Daemon
   Loaded: loaded (/lib/systemd/system/transmission-daemon.service; enabled)
   Active: active (running) since Wed 2017-01-25 12:18:13 IST; 30min ago
 Main PID: 739 (transmission-da)
   Status: "Idle."
   CGroup: /system.slice/transmission-daemon.service
           └─739 /usr/bin/transmission-daemon -f --log-error

However inorder to run this service with the logging enabled, i need to start this service with the switch --log-file <path to the log file>. In that way i need this service to be run as

/usr/bin/transmission-daemon -f --log-error --log-file /var/log/transmission.log.

I can disable this existing service using sudo systemctl disable transmission-daemon.service, But not sure on how to recreate this service with the new switches.

Please suggest.

  • This is not Raspberry pi specific, try googling transmission-daemon log file. If you are just interesting to see the logs and do not need a specific logfile, it should be in /var/log/syslog or /var/log/daemon.log. – jogco Jan 25 '17 at 8:05
  • @jogco: Yes, as you said, this is not Pi specific. As per Transmission documentation, i would need to start the transmission service as per /usr/bin/transmission-daemon -f --log-error --log-file /var/log/transmission.log. But since the service runs as /usr/bin/transmission-daemon -f --log-error, Im not able to get the log file created. I just need to know how to create this service with the required parameters. – Alan Jebakumar Feb 5 '17 at 14:17
0

Okay... Your system is starting transmission with the /lib/systemd/system/transmission-daemon.service script.

So all you need to do is to edit this to include the log file option:

Change the line:

ExecStart=/usr/bin/transmission-daemon -f --log-error

to

ExecStart=/usr/bin/transmission-daemon -f --log-error --logfile /var/log/transmission.log

then do a

sudo systemctl daemon-reload

and restart your daemon with

sudo service transmission-daemon restart

Note that the logfile option flag is "logfile" not "log-file"

  • Wonderful. Let me try this & update you. – Alan Jebakumar Feb 8 '17 at 20:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.