From: Peter Wagner Date: Mon, 11 Mar 2019 18:58:14 +0000 (+0100) Subject: tor: always create folders and set ownership X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=c6aa3d1fabff6dbf54bb2d081662fa6d2263b1be;p=feed%2Fpackages.git tor: always create folders and set ownership Signed-off-by: Peter Wagner --- diff --git a/net/tor/Makefile b/net/tor/Makefile index 30eb0b3b5a..41e7c8d635 100644 --- a/net/tor/Makefile +++ b/net/tor/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=tor PKG_VERSION:=0.3.5.8 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://dist.torproject.org/ \ diff --git a/net/tor/files/tor.init b/net/tor/files/tor.init index 6974057d45..ee0818d9d1 100644 --- a/net/tor/files/tor.init +++ b/net/tor/files/tor.init @@ -7,19 +7,15 @@ STOP=50 USE_PROCD=1 start_service() { - [ -f /var/run/tor.pid ] || { - touch /var/run/tor.pid - chown tor:tor /var/run/tor.pid - } - [ -d /var/lib/tor ] || { - mkdir -m 0755 -p /var/lib/tor - chmod 0700 /var/lib/tor - chown tor:tor /var/lib/tor - } - [ -d /var/log/tor ] || { - mkdir -m 0755 -p /var/log/tor - chown tor:tor /var/log/tor - } + touch /var/run/tor.pid + chown tor:tor /var/run/tor.pid + + mkdir -m 0700 -p /var/lib/tor + chown -R tor:tor /var/lib/tor + + mkdir -m 0755 -p /var/log/tor + chown -R tor:tor /var/log/tor + procd_open_instance procd_set_param command /usr/sbin/tor --runasdaemon 0 procd_close_instance