Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

allow ttrssd to run as a specified user (take two) #306

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion www/tt-rss/files/ttrssd.in
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
# Add the following lines to /etc/rc.conf to enable `ttrssd':
#
# ttrssd_enable="YES"
#
# Optional:
# ttrssd_run_as_user The user to run as (default www)

. /etc/rc.subr

Expand All @@ -18,6 +21,7 @@ rcvar=ttrssd_enable
# read settings, set default values
load_rc_config "${name}"
: ${ttrssd_enable="NO"}
: ${ttrssd_run_as_user="%%WWWOWN%%"}

long_name="Tiny Tiny RSS updating feeds daemon."
required_files="%%WWWDIR%%/config.php"
Expand All @@ -30,7 +34,7 @@ phpupd="%%WWWDIR%%/update_daemon2.php"
ttrssd_log="/var/log/${name}.log"

command="/usr/sbin/daemon"
command_args="-rR 10 -H -u %%WWWOWN%% \
command_args="-rR 10 -H -u $ttrssd_run_as_user \
-P $pidfile -p $cpidfile \
-o $ttrssd_log sh -c \
'$initdb_php --update-schema=force-yes; \
Expand Down
2 changes: 1 addition & 1 deletion www/tt-rss/pkg-plist
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
%%DATADIR%%/httpd-tt-rss.conf
@sample %%EXAMPLESDIR%%/newsyslog.sample etc/newsyslog.conf.d/ttrssd.conf
@group %%WWWGRP%%
@mode ug=rx
@mode ugo=rx
%%WWWDIR%%/update.php
%%WWWDIR%%/update_daemon2.php
@group
Expand Down