Skip to content

Instantly share code, notes, and snippets.

@DieKatzchen
Created September 15, 2015 00:55
Show Gist options
  • Save DieKatzchen/7f0135da611b812cc976 to your computer and use it in GitHub Desktop.
Save DieKatzchen/7f0135da611b812cc976 to your computer and use it in GitHub Desktop.
TT-RSS rc.d script for FreeBSD.
#!/bin/sh
#
# PROVIDE: reader
# REQUIRE: php-fpm postgresql
#
# This rc.d script will autostart TT-RSS, it can be started, stopped,
# and restarted with the usual commands.
#
# Add the following to /etc/rc.conf[.local] to enable this service
#
# reader_enable="YES"
#
. /etc/rc.subr
name=reader
rcvar=reader_enable
command="/usr/local/www/tt-rss/update.php"
command_interpreter=php
pidfile=/var/run/reader.pid
reader_user=www
start_cmd="/usr/sbin/daemon -f -p $pidfile -u $reader_user $command --daemon"
load_rc_config $name
run_rc_command "$1"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment