我的安装脚本
#!/bin/bash
rpm --import http://li.nux.ro/download/nux/RPM-GPG-KEY-nux.ro
yum -y install epel-release && rpm -Uvh http://li.nux.ro/download/nux/dextop/el6/x86_64/nux-dextop-release-0-2.el6.nux.noarch.rpm
yum install deluge -y
/etc/init.d/deluge-daemon start
我制作了一个可以创建多个实例的脚本。
#!/bin/bash
me="$(basename "$(test -L "$0" && readlink "$0" || echo "$0")")"
if [ $# -ge 3 ]
then
user="$1"
password="$2"
web_port="$3"
daemon_port=$((web_port + 1))
dir="/home/$user/.config/deluge"
if [ ! -d "$dir" ]; then
check_port_using=$(ps aux | egrep "[-]-port $daemon_port")
if [ -z "$check_port_using" ]; then
true &>/dev/null </dev/tcp/127.0.0.1/$daemon_port && check_port='0' || check_port='1'
if [ "$check_port" -eq "1" ]; then
true &>/dev/null </dev/tcp/127.0.0.1/$web_port && check_port_web='0' || check_port_web='1'
if [ "$check_port_web" -eq "1" ]; then
if getent passwd $1 > /dev/null 2>&1; then
echo ""
else
adduser "$user"
echo "$password" | passwd "$user" --stdin
fi
sudo su $user -c "deluged --config $dir --port $daemon_port"
sudo su $user -c "deluge-web --config $dir --port $web_port --fork"
sleep 1
pkill -u $user
sleep 4
sed -i "s/port.*/port\": $web_port/" $dir/web.conf
sed -i "s/first_login.*/first_login\": false,/" $dir/web.conf
sed -i "s/default_daemon.*/default_daemon\": $daemon_port,/" $dir/web.conf
sed -i "s/allow_remote.*/allow_remote\": true,/" $dir/core.conf
sed -i "s/daemon_port.*/daemon_port\": $daemon_port,/" $dir/core.conf
sed -i "s/download_location.*/download_location\": \"\/home\/$user\",/" $dir/core.conf
sed -i "s/autoadd_location.*/autoadd_location\": \"\/home\/$user\",/" $dir/core.conf
sed -i "s/move_completed_path.*/move_completed_path\": \"\/home\/$user\",/" $dir/core.conf
sed -i "s/torrentfiles_location.*/torrentfiles_location\": \"\/home\/$user\",/" $dir/core.conf
sudo su $user -c "echo '$user:$password:10' >> $dir/auth"
sudo su $user -c "deluge-web --config $dir --port $web_port --fork"
sudo su $user -c "deluged --config $dir --port $daemon_port"
else
echo "Le port $web_port n'est pas libre"
fi
else
echo "Le port $daemon_port n'est pas libre"
fi
else
echo "Une instance de Deluge est lancé sur le port $daemon_port"
fi
else
echo "Le compte $user possède un compte Deluge"
fi
else
echo "$me <username> <password> <web port>"
fi
在deluge-console上,我无法连接到任何守护程序。
用户测试的大量配置内容
localclient:650ad6d782c6a17a24197fc353eefbe4a745df24:10
test:root:5
core.conf
{
"file": 1,
"format": 1
}{
"info_sent": 0.0,
"lsd": true,
"max_download_speed": -1.0,
"send_info": false,
"natpmp": true,
"move_completed_path": "/home/test/Downloads",
"peer_tos": "0x00",
"enc_in_policy": 1,
"queue_new_to_top": false,
"ignore_limits_on_local_network": true,
"rate_limit_ip_overhead": true,
"daemon_port": 58840,
"torrentfiles_location": "/home/test/Downloads",
"max_active_limit": 8,
"geoip_db_location": "/usr/share/GeoIP/GeoIP.dat",
"upnp": true,
"utpex": true,
"max_active_downloading": 3,
"max_active_seeding": 5,
"allow_remote": true,
"outgoing_ports": [
0,
0
],
"enabled_plugins": [],
"max_half_open_connections": 50,
"download_location": "/home/test/Downloads",
"compact_allocation": false,
"max_upload_speed": -1.0,
"plugins_location": "/home/test/.config/deluge/plugins",
"max_connections_global": 200,
"enc_prefer_rc4": true,
"cache_expiry": 60,
"dht": true,
"stop_seed_at_ratio": false,
"stop_seed_ratio": 2.0,
"max_download_speed_per_torrent": -1,
"prioritize_first_last_pieces": false,
"max_upload_speed_per_torrent": -1,
"auto_managed": true,
"enc_level": 2,
"copy_torrent_file": false,
"max_connections_per_second": 20,
"listen_ports": [
6881,
6891
],
"max_connections_per_torrent": -1,
"del_copy_torrent_file": false,
"move_completed": false,
"autoadd_enable": false,
"proxies": {
"peer": {
"username": "",
"password": "",
"hostname": "",
"type": 0,
"port": 8080
},
"web_seed": {
"username": "",
"password": "",
"hostname": "",
"type": 0,
"port": 8080
},
"tracker": {
"username": "",
"password": "",
"hostname": "",
"type": 0,
"port": 8080
},
"dht": {
"username": "",
"password": "",
"hostname": "",
"type": 0,
"port": 8080
}
},
"dont_count_slow_torrents": false,
"add_paused": false,
"random_outgoing_ports": true,
"max_upload_slots_per_torrent": -1,
"new_release_check": true,
"enc_out_policy": 1,
"seed_time_ratio_limit": 7.0,
"remove_seed_at_ratio": false,
"autoadd_location": "/home/test/Downloads",
"max_upload_slots_global": 4,
"seed_time_limit": 180,
"cache_size": 512,
"share_ratio_limit": 2.0,
"random_port": true,
"listen_interface": ""
}
web.conf
{
"file": 1,
"format": 1
}{
"port": 8140,
"enabled_plugins": [],
"pwd_sha1": "2ce1a410bcdcc53064129b6d950f2e9fee4edc1e",
"theme": "gray",
"show_sidebar": true,
"sidebar_show_zero": false,
"pkey": "ssl/daemon.pkey",
"https": false,
"sessions": {
"111859060b3446c9f525d54760265b2d": {
"login": "admin",
"expires": 1541696000.0,
"level": 10
}
},
"base": "/",
"pwd_salt": "c26ab3bbd8b137f99cd83c2c1c0963bcc1a35cad",
"show_session_speed": false,
"first_login": false,
"cert": "ssl/daemon.cert",
"session_timeout": 3600,
"default_daemon": "",
"sidebar_multiple_filters": true
}
我不知道我在做什么错。我没有任何错误。 我也禁用了iptable进行测试。