Feuermurmel / youtube-podcast-gateway

Do What The F*ck You Want To Public License
38 stars 5 forks source link

Instructions for running it as a daemon #7

Open Feuermurmel opened 9 years ago

Feuermurmel commented 9 years ago

Probably just use ISC cron's @reboot syntax and some redirection to a log file.

Feuermurmel commented 8 years ago

Or write a systemd unit file!!1 Yay!

fessacchiotto commented 8 years ago

I managed to create the following systems unit file:

/etc/systemd/system/youtube-podcast-gateway.service
[Unit]
Description=youtube-podcast-gateway

[Service]
ExecStart=/home/ubuntu/youtube-podcast-gateway/run.sh
#ExecReload=/usr/bin/pkill -f run.sh ; sleep 1 ; home/ubuntu/youtube-podcast-gateway/run.sh
ExecStop=/usr/bin/pkill -f run.sh

For some reason I'm not able to make working the ExecReload command...

Feuermurmel commented 8 years ago

I'm not ultra-familiar with systemd but shouldn't declaring ExecStop be unnecessary for services which do not need to be shut down properly? I.e. systemd can just kill the whole process group/session/whatever?

Otherwise I'd like to but this into the repository as an example unit file. I will test this myself. Soon. :)