Set permissions for /var/lib/tor and /var/ipfire/tor to tor:tor, regardless whether Tor user has been created before or not.
This ensures Tor starts properly on existing systems after reinstallation of the add-on. Thanks to Michael for the hint.
Further, a comment for new Tor user in /etc/passwd has been added.
Fixes #11779.
Signed-off-by: Peter Müller peter.mueller@ipfire.org --- src/paks/tor/install.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/paks/tor/install.sh b/src/paks/tor/install.sh index e1ed33331..268bccecd 100644 --- a/src/paks/tor/install.sh +++ b/src/paks/tor/install.sh @@ -29,12 +29,12 @@ if ! getent group tor &>/dev/null; then fi
if ! getent passwd tor; then - useradd -u 119 -g tor -d /var/empty -s /bin/false tor - - # Adjust some folder permission for new UID/GID - chown -R tor:tor /var/lib/tor /var/ipfire/tor + useradd -u 119 -g tor -c "Tor daemon user" -d /var/empty -s /bin/false tor fi
+# Adjust some folder permission for new UID/GID +chown -R tor:tor /var/lib/tor /var/ipfire/tor + extract_files restore_backup ${NAME} start_service --background ${NAME}