[packages] transmission: offer option to run transmission as different user (#7555)
git-svn-id: svn://svn.openwrt.org/openwrt/packages@22065 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
108f3b4afa
commit
a12ff2c4bc
@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
|
|||||||
|
|
||||||
PKG_NAME:=transmission
|
PKG_NAME:=transmission
|
||||||
PKG_VERSION:=2.00
|
PKG_VERSION:=2.00
|
||||||
PKG_RELEASE:=1
|
PKG_RELEASE:=2
|
||||||
|
|
||||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
|
||||||
PKG_SOURCE_URL:=http://mirrors.m0k.org/transmission/files
|
PKG_SOURCE_URL:=http://mirrors.m0k.org/transmission/files
|
||||||
|
@ -37,12 +37,14 @@ append_params_quotes() {
|
|||||||
start_service() {
|
start_service() {
|
||||||
local s="$1"
|
local s="$1"
|
||||||
local enable=0
|
local enable=0
|
||||||
|
local run_as_usr='root'
|
||||||
|
|
||||||
# disabled?
|
# disabled?
|
||||||
config_get_bool enable "$s" enable 0
|
config_get_bool enable "$s" enable 0
|
||||||
[ "$enable" == 0 ] && return 0
|
[ "$enable" == 0 ] && return 0
|
||||||
config_get config_dir "$s" config_dir '/tmp/transmission'
|
config_get config_dir "$s" config_dir '/tmp/transmission'
|
||||||
mkdir -p "$config_dir"
|
mkdir -p "$config_dir"
|
||||||
|
config_get run_as_usr "$s" run_daemon_as_user 'root'
|
||||||
|
|
||||||
echo "{" > $config_dir/settings.json
|
echo "{" > $config_dir/settings.json
|
||||||
|
|
||||||
@ -69,7 +71,7 @@ start_service() {
|
|||||||
echo "\""invalid-key"\": false" >> $config_dir/settings.json
|
echo "\""invalid-key"\": false" >> $config_dir/settings.json
|
||||||
echo "}" >> $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() {
|
start() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user