thttpd doesn't provide a systemd unit file. Reproducible: Always Steps to Reproduce: 1. Install thttpd. 2. Try to start it with systemd. Actual Results: Sadness at the lack of a thttpd. Expected Results: Unit file is available, happiness and rejoice from the great gystemd+thttpd experience.
(In reply to Roc Vallès from comment #0) > thttpd doesn't provide a systemd unit file. > > Reproducible: Always > > Steps to Reproduce: > 1. Install thttpd. > 2. Try to start it with systemd. > Actual Results: > Sadness at the lack of a thttpd. > > Expected Results: > Unit file is available, happiness and rejoice from the great gystemd+thttpd > experience. Can you write me a systemd unit file and I'll add it.
(In reply to Anthony Basile from comment #1) > (In reply to Roc Vallès from comment #0) > > thttpd doesn't provide a systemd unit file. > > > > Reproducible: Always > > > > Steps to Reproduce: > > 1. Install thttpd. > > 2. Try to start it with systemd. > > Actual Results: > > Sadness at the lack of a thttpd. > > > > Expected Results: > > Unit file is available, happiness and rejoice from the great gystemd+thttpd > > experience. > > Can you write me a systemd unit file and I'll add it. Ok, I'll look into it tonight.
Created attachment 365704 [details] systemd unit for thttpd Here's thttpd.service, written by me.
(In reply to Roc Vallès from comment #3) > Created attachment 365704 [details] > systemd unit for thttpd > > Here's thttpd.service, written by me. Okay, I've committed this with one change. I removed the line WorkingDirectory=/var/www/thttpd because that directory doesn't exists (or at least its not installed by portages) and this causes the daemon to fail to start. Please test and re-open this bug if anything is broken.
(In reply to Anthony Basile from comment #4) > (In reply to Roc Vallès from comment #3) > > Created attachment 365704 [details] > > systemd unit for thttpd > > > > Here's thttpd.service, written by me. > > Okay, I've committed this with one change. I removed the line > > WorkingDirectory=/var/www/thttpd > > because that directory doesn't exists (or at least its not installed by > portages) and this causes the daemon to fail to start. > > Please test and re-open this bug if anything is broken. Without WorkingDirectory... the server serves / by default. (!) I don't think that's desirable behaviour, so you must set something reasonable on it. From the conf.d default configuration file: ## the startup-dir of thttpd is the docroot, so we specify it here ## and the init-script does a "cd" prior to startup: THTTPD_DOCROOT="/var/www/localhost" I would at least set it to that for now.
A preferred solution would be to change the default: THTTPD_DOCROOT="/var/www/localhost" to THTTPD_DOCROOT="/var/www/thttpd" And have the ebuild create the dir if it doesn't exist. That makes more sense as a default, since thttpd does support vhosts, which would be implemented as directories from its DOCROOT.
(In reply to Roc Vallès from comment #6) > A preferred solution would be to change the default: > > THTTPD_DOCROOT="/var/www/localhost" > > to > > THTTPD_DOCROOT="/var/www/thttpd" > > And have the ebuild create the dir if it doesn't exist. > > That makes more sense as a default, since thttpd does support vhosts, which > would be implemented as directories from its DOCROOT. No that's not a good idea because of the way our vhosting works. I'll add WorkingDirectory=/var/www/localhost to the unit file.
Committed. Feel free to reopen if this doesn't work for you. Its working at my end.