mirror of
https://github.com/YunoHost-Apps/transmission_ynh.git
synced 2024-09-04 01:46:12 +02:00
Fix root installation
This commit is contained in:
parent
4940447bdb
commit
8716132517
3 changed files with 13 additions and 3 deletions
|
@ -50,7 +50,7 @@
|
|||
"rpc-host-whitelist-enabled": false,
|
||||
"rpc-password": "__RPC_PASSWORD_TO_CHANGE__",
|
||||
"rpc-port": __PORT__,
|
||||
"rpc-url": "__PATH__/transmission/",
|
||||
"rpc-url": "__PATH__transmission/",
|
||||
"rpc-username": "transmission",
|
||||
"rpc-whitelist": "127.0.0.1",
|
||||
"rpc-whitelist-enabled": false,
|
||||
|
|
|
@ -120,7 +120,12 @@ ynh_app_setting_set --app=$app --key=rpcpassword --value="$rpcpassword"
|
|||
|
||||
|
||||
ynh_replace_string --match_string="__RPC_PASSWORD_TO_CHANGE__" --replace_string="$rpcpassword" --target_file=../conf/settings.json
|
||||
ynh_replace_string --match_string="__PATH__" --replace_string="$path_url" --target_file=../conf/settings.json
|
||||
if [ "$path_url" != "/" ]
|
||||
then
|
||||
ynh_replace_string --match_string="__PATH__" --replace_string="$path_url/" --target_file=../conf/settings.json
|
||||
else
|
||||
ynh_replace_string --match_string="__PATH__" --replace_string="$path_url" --target_file=../conf/settings.json
|
||||
fi
|
||||
ynh_replace_string --match_string="__PEER_PORT__" --replace_string="$peer_port" --target_file=../conf/settings.json
|
||||
ynh_replace_string --match_string="__PORT__" --replace_string="$port" --target_file=../conf/settings.json
|
||||
cp ../conf/settings.json /etc/transmission-daemon/settings.json
|
||||
|
|
|
@ -124,7 +124,12 @@ rpcpassword=$(ynh_string_random)
|
|||
ynh_app_setting_set --app=$app --key=rpcpassword --value="$rpcpassword"
|
||||
|
||||
ynh_replace_string --match_string="__RPC_PASSWORD_TO_CHANGE__" --replace_string="$rpcpassword" --target_file=../conf/settings.json
|
||||
ynh_replace_string --match_string="__PATH__" --replace_string="$path_url" --target_file=../conf/settings.json
|
||||
if [ "$path_url" != "/" ]
|
||||
then
|
||||
ynh_replace_string --match_string="__PATH__" --replace_string="$path_url/" --target_file=../conf/settings.json
|
||||
else
|
||||
ynh_replace_string --match_string="__PATH__" --replace_string="$path_url" --target_file=../conf/settings.json
|
||||
fi
|
||||
ynh_replace_string --match_string="__PEER_PORT__" --replace_string="$peer_port" --target_file=../conf/settings.json
|
||||
ynh_replace_string --match_string="__PORT__" --replace_string="$port" --target_file=../conf/settings.json
|
||||
cp ../conf/settings.json /etc/transmission-daemon/settings.json
|
||||
|
|
Loading…
Add table
Reference in a new issue