From ebe574915449d2181e77f607190514fbdb98daf7 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Sun, 4 Jul 2010 20:58:53 +0000 Subject: [PATCH] transmission: offer option to run transmission as different user (#7555) SVN-Revision: 22065 --- net/transmission/Makefile | 2 +- net/transmission/files/transmission.init | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/net/transmission/Makefile b/net/transmission/Makefile index 3e9685590..234c1d6b6 100644 --- a/net/transmission/Makefile +++ b/net/transmission/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=transmission PKG_VERSION:=2.00 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:=http://mirrors.m0k.org/transmission/files diff --git a/net/transmission/files/transmission.init b/net/transmission/files/transmission.init index b80190dff..b7c7cc6d7 100644 --- a/net/transmission/files/transmission.init +++ b/net/transmission/files/transmission.init @@ -37,12 +37,14 @@ append_params_quotes() { start_service() { local s="$1" local enable=0 + local run_as_usr='root' # disabled? config_get_bool enable "$s" enable 0 [ "$enable" == 0 ] && return 0 config_get config_dir "$s" config_dir '/tmp/transmission' mkdir -p "$config_dir" + config_get run_as_usr "$s" run_daemon_as_user 'root' echo "{" > $config_dir/settings.json @@ -69,7 +71,7 @@ start_service() { echo "\""invalid-key"\": false" >> $config_dir/settings.json echo "}" >> $config_dir/settings.json - eval "$SSD -q -b -x $BIN -S -- -g $config_dir" + eval "$SSD -c $run_as_usr -q -b -x $BIN -S -- -g $config_dir" } start() { -- 2.30.2