diff options
author | BlackNoxis <steven.darklight@gmail.com> | 2015-08-24 20:47:16 +0300 |
---|---|---|
committer | BlackNoxis <steven.darklight@gmail.com> | 2015-08-24 20:47:16 +0300 |
commit | 0c6710a5661dcb9d197d5dc6c5f22aeb03ba583d (patch) | |
tree | 2792107df1e29aa284f37a4302b05eed7689b6ed /net-libs/tox/files | |
parent | 3a33f2966f834d3520b03df59018e3d0295fcc69 (diff) |
Revert "[toxcore] adaugat toxcore"
This reverts commit 3a33f2966f834d3520b03df59018e3d0295fcc69.
Diffstat (limited to 'net-libs/tox/files')
-rw-r--r-- | net-libs/tox/files/confd | 9 | ||||
-rw-r--r-- | net-libs/tox/files/initd | 18 | ||||
-rw-r--r-- | net-libs/tox/files/tox-bootstrapd.conf | 65 | ||||
-rw-r--r-- | net-libs/tox/files/tox-bootstrapd.service | 18 |
4 files changed, 18 insertions, 92 deletions
diff --git a/net-libs/tox/files/confd b/net-libs/tox/files/confd index 33f850bf..e4aac3ad 100644 --- a/net-libs/tox/files/confd +++ b/net-libs/tox/files/confd @@ -1,2 +1,7 @@ -TOX_GROUP=tox -TOX_USER=tox +# [--ipv4|--ipv6] +cmdline="" + +# open node +ip="" +port="" +key="" diff --git a/net-libs/tox/files/initd b/net-libs/tox/files/initd index c500e9b4..728cb6f5 100644 --- a/net-libs/tox/files/initd +++ b/net-libs/tox/files/initd @@ -1,7 +1,8 @@ #!/sbin/runscript -PIDDIR=/run/tox-bootstrapd -PIDFILE="${PIDDIR}"/tox-bootstrap.pid +PIDFILE=/run/tox-dht-bootstrap.pid +LOGDIR=/var/log/tox-dht-bootstrap +RUNDIR=/var/lib/tox-dht-bootstrap depend() { need net @@ -10,13 +11,16 @@ depend() { start() { ebegin "Starting tox-dht-bootstrap daemon" - [ -d "${PIDDIR}" ] || mkdir -p "${PIDDIR}" - chown -R ${TOX_USER}:${TOX_GROUP} "${PIDDIR}" + [ -d "${LOGDIR}" ] || mkdir -p "${LOGDIR}" + [ -d "${RUNDIR}" ] || mkdir -p "${RUNDIR}" + chown -R nobody:nobody "${LOGDIR}" "${RUNDIR}" start-stop-daemon --start \ - --pidfile "${PIDFILE}" \ - --user=${TOX_USER} --group=${TOX_GROUP} \ - --exec /usr/bin/tox-bootstrapd -- /etc/tox-bootstrapd.conf + --pidfile "${PIDFILE}" --make-pidfile --background \ + --stdout "${LOGDIR}/stdout" --stderr "${LOGDIR}/stderr" \ + --chdir "${RUNDIR}" \ + --user=nobody --group=nobody \ + --exec /usr/bin/DHT_bootstrap eend $? } diff --git a/net-libs/tox/files/tox-bootstrapd.conf b/net-libs/tox/files/tox-bootstrapd.conf deleted file mode 100644 index 3413f590..00000000 --- a/net-libs/tox/files/tox-bootstrapd.conf +++ /dev/null @@ -1,65 +0,0 @@ -// Tox DHT bootstrap daemon configuration file. - -// Listening port (UDP). -port = 33445 - -// A key file is like a password, so keep it where no one can read it. -// If there is no key file, a new one will be generated. -// The daemon should have permission to read/write it. -keys_file_path = "/var/lib/tox-bootstrapd/keys" - -// The PID file written to by the daemon. -// Make sure that the user that daemon runs as has permissions to write to the -// PID file. -pid_file_path = "/var/run/tox-bootstrapd/tox-bootstrapd.pid" - -// Enable IPv6. -enable_ipv6 = true - -// Fallback to IPv4 in case IPv6 fails. -enable_ipv4_fallback = true - -// Automatically bootstrap with nodes on local area network. -enable_lan_discovery = true - -enable_tcp_relay = true - -// While Tox uses 33445 port by default, 443 (https) and 3389 (rdp) ports are very -// common among nodes, so it's encouraged to keep them in place. -tcp_relay_ports = [443, 3389, 33445] - -// Reply to MOTD (Message Of The Day) requests. -enable_motd = true - -// Just a message that is sent when someone requests MOTD. -// Put anything you want, but note that it will be trimmed to fit into 255 bytes. -motd = "tox-bootstrapd" - -// Any number of nodes the daemon will bootstrap itself off. -// -// Remember to replace the provided example with your own node list. -// There is a maintained list of bootstrap nodes on Tox's wiki, if you need it -// (https://wiki.tox.chat/users/nodes). -// -// You may leave the list empty or remove "bootstrap_nodes" completely, -// in both cases this will be interpreted as if you don't want to bootstrap -// from anyone. -// -// address = any IPv4 or IPv6 address and also any US-ASCII domain name. -bootstrap_nodes = ( - { // Example Node 1 (IPv4) - address = "127.0.0.1" - port = 33445 - public_key = "728925473812C7AAC482BE7250BCCAD0B8CB9F737BF3D42ABD34459C1768F854" - }, - { // Example Node 2 (IPv6) - address = "::1/128" - port = 33445 - public_key = "3E78BACF0F84235B30054B54898F56793E1DEF8BD46B1038B9D822E8460FAB67" - }, - { // Example Node 3 (US-ASCII domain name) - address = "example.org" - port = 33445 - public_key = "8CD5A9BF0A6CE358BA36F7A653F99FA6B258FF756E490F52C1F98CC420F78858" - } -) diff --git a/net-libs/tox/files/tox-bootstrapd.service b/net-libs/tox/files/tox-bootstrapd.service deleted file mode 100644 index 1581026c..00000000 --- a/net-libs/tox/files/tox-bootstrapd.service +++ /dev/null @@ -1,18 +0,0 @@ -[Unit] -Description=Tox DHT Bootstrap Daemon -After=network.target - -[Service] -Type=forking -PermissionsStartOnly=true -ExecStartPre=-/bin/mkdir /var/run/tox-bootstrapd -p -ExecStartPre=/bin/chown tox:tox -R /var/run/tox-bootstrapd -WorkingDirectory=/var/lib/tox-bootstrapd -ExecStart=/usr/bin/tox-bootstrapd /etc/tox-bootstrapd.conf -User=tox -Group=tox -PIDFile=/var/run/tox-bootstrapd/tox-bootstrapd.pid -#CapabilityBoundingSet=CAP_NET_BIND_SERVICE - -[Install] -WantedBy=multi-user.target |