Steps to Reproduce: 1. eselect sh set dash 2. rc-service ttrssd start Actual Results: * Caching service dependencies ... [ ok ] /lib/rc/sh/openrc-run.sh: 29: Bad substitution * Starting TT-RSS update daemon in /var/www/<omitted> ... * start-stop-daemon: /usr/bin/php died [ !! ] * ERROR: ttrssd failed to start
Created attachment 764950 [details] ttrssd.initd-r4 Here's my fixed version. Changelog: * Fixed bashisms in instance_dir_to_name() function * Fixed ksh93 syntax (IFS=$'\n') not present in dash * Renamed setup() into start_pre() * Added status() function so ttrssd can be restarted now Signed-off-by: Anna Vyalkova <cyber+gentoo@sysrq.in>
Thanks! Sorry for the bashisms, I forget what some of them are. IFS=$(printf "\n" "") doesn't work for me. Not sure why you need the extra "" but $(printf "\n") doesn't work either. This does work though: IFS=" " For the status() function, I'd rather do it like this: start-stop-daemon --signal 0 --pidfile "${PID_DIR}/${instance_name}.pid" Please could you amend and try it out?
Created attachment 765104 [details] ttrssd.initd-r4 (updated) (In reply to James Le Cuirot from comment #2) > Not sure why you need the extra "" but $(printf "\n") doesn't work either. This does work though: > > IFS=" > " Done. > For the status() function, I'd rather do it like this: > > start-stop-daemon --signal 0 --pidfile "${PID_DIR}/${instance_name}.pid" Done. Signed-off-by: Anna Vyalkova <cyber+gentoo@sysrq.in>
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6bbd050f9ecc0fadd9fae6eabc7206a6042d397f commit 6bbd050f9ecc0fadd9fae6eabc7206a6042d397f Author: James Le Cuirot <chewi@gentoo.org> AuthorDate: 2022-02-19 15:59:25 +0000 Commit: James Le Cuirot <chewi@gentoo.org> CommitDate: 2022-02-19 16:00:37 +0000 www-apps/tt-rss: Bump to 20220218, EAPI 8, fix for dash, fix permissions Thanks to Anna Vyalkova for the dash fix. Note that the configuration syntax has changed since the last version. Closes: https://bugs.gentoo.org/833206 Signed-off-by: James Le Cuirot <chewi@gentoo.org> www-apps/tt-rss/Manifest | 1 + www-apps/tt-rss/files/permissions-r1 | 24 +++++ .../tt-rss/files/postinstall-en-with-daemon-r1.txt | 3 +- www-apps/tt-rss/files/postinstall-en.txt | 3 +- www-apps/tt-rss/files/tt-rss-no-chmod.patch | 26 +++++ www-apps/tt-rss/files/ttrssd.initd-r4 | 119 +++++++++++++++++++++ www-apps/tt-rss/tt-rss-20200922.ebuild | 5 - www-apps/tt-rss/tt-rss-20220218.ebuild | 90 ++++++++++++++++ www-apps/tt-rss/tt-rss-99999999.ebuild | 20 ++-- 9 files changed, 271 insertions(+), 20 deletions(-)