diff --git a/README.md b/README.md index c010adc..7059f2e 100644 --- a/README.md +++ b/README.md @@ -152,14 +152,12 @@ That sould be it. Have fun! [misc/](https://basedwa.re/tmtt/feuille/src/branch/main/misc), [cgi/](https://basedwa.re/tmtt/feuille/src/branch/main/cgi) and [cron/](https://basedwa.re/tmtt/feuille/src/branch/main/cron)) -[service/](https://basedwa.re/tmtt/feuille/src/branch/main/service)) * A list of aliases for your users' `~/.{ba,z,k}shrc` * A CGI script that lets the user send pastes directly from your website * A sample HTML form for your CGI script * A cron job that deletes expired pastes - * A SystemD service file - * An OpenRC service file + * A cron job that runs **feuille** at startup * Lots of options (see [configuration](#configuration)) * Works on nearly all POSIX-compliant OSes @@ -233,37 +231,19 @@ either on your computer by doing `man feuille` or on the ### How do I make feuille run at startup? -We made some service files for that. +You can put that in your crontab (by doing `sudo crontab -e`). +It will start **feuille** every time the system starts. +No need for some fancy service file :DDD -#### SystemD +Want to stop feuille? `pkill feuille` will do the job. -Tweak -[service/systemd](https://basedwa.re/tmtt/feuille/src/branch/main/service/systemd) -to your liking and copy it to `/etc/systemd/system/feuille.service`. - -Then, do (as root): - -```console -# systemctl daemon-reload -# systemctl enable feuille -# systemctl start feuille +``` +@reboot feuille -U https://my.paste.bin ``` -#### OpenRC - -Copy -[service/openrc](https://basedwa.re/tmtt/feuille/src/branch/main/service/openrc) -into `/etc/rc.d/feuille`. - -Then, do (as root): - -```console -# rcctl enable feuille -# rcctl set feuille flags -U https://my.paste.bin -# rcctl start feuille -``` - -Tweak the flags to your liking. +See +[cron/startup.cron](https://basedwa.re/tmtt/feuille/src/branch/main/cron/startup.cron) +if you'd like to download the cron job. ### How do I remove expired pastes after some time? diff --git a/cron/startup.cron b/cron/startup.cron new file mode 100644 index 0000000..1e6fc5f --- /dev/null +++ b/cron/startup.cron @@ -0,0 +1 @@ +@reboot feuille -U https://my.paste.bin diff --git a/service/systemd b/service/systemd index 9391b3e..9a52e63 100644 --- a/service/systemd +++ b/service/systemd @@ -5,7 +5,7 @@ # $ systemctl start feuille [Unit] -Description=feuille - a fast, dead-simple socket-based pastebin +Description=Feuille - a fast, dead-simple socket-based pastebin After=syslog.target network.target [Service]