Skip to content

Instantly share code, notes, and snippets.

@DieKatzchen
Created September 15, 2015 00:55
Show Gist options
  • Select an option

  • Save DieKatzchen/7f0135da611b812cc976 to your computer and use it in GitHub Desktop.

Select an option

Save DieKatzchen/7f0135da611b812cc976 to your computer and use it in GitHub Desktop.

Revisions

  1. DieKatzchen created this gist Sep 15, 2015.
    27 changes: 27 additions & 0 deletions reader
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,27 @@
    #!/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"