summaryrefslogtreecommitdiff
path: root/other/bootstrap_serverdaemon
diff options
context:
space:
mode:
authorMaxim Biro <nurupo.contributions@gmail.com>2014-01-25 21:00:31 -0500
committerMaxim Biro <nurupo.contributions@gmail.com>2014-01-25 21:00:31 -0500
commit553472442fd1ddcf224b7a3bbfc1ed51c2cedfad (patch)
tree1e3600c1f4309ce971f685d7ef86f4ee8eed0164 /other/bootstrap_serverdaemon
parent4782a8475a3476642d5a9f747a5de7080a44b1ea (diff)
Shortened daemon's name
Diffstat (limited to 'other/bootstrap_serverdaemon')
-rw-r--r--other/bootstrap_serverdaemon/Makefile.inc12
-rw-r--r--other/bootstrap_serverdaemon/README.md22
-rw-r--r--other/bootstrap_serverdaemon/conf4
-rw-r--r--other/bootstrap_serverdaemon/tox_bootstrap_daemon.c (renamed from other/bootstrap_serverdaemon/tox_dht_bootstrap_server_daemon.c)10
-rw-r--r--other/bootstrap_serverdaemon/tox_bootstrap_daemon.sh (renamed from other/bootstrap_serverdaemon/tox_dht_bootstrap_server_daemon.sh)11
5 files changed, 30 insertions, 29 deletions
diff --git a/other/bootstrap_serverdaemon/Makefile.inc b/other/bootstrap_serverdaemon/Makefile.inc
index 5ab17b56..effe59e8 100644
--- a/other/bootstrap_serverdaemon/Makefile.inc
+++ b/other/bootstrap_serverdaemon/Makefile.inc
@@ -1,17 +1,17 @@
1if BUILD_DHT_BOOTSTRAP_DAEMON 1if BUILD_DHT_BOOTSTRAP_DAEMON
2 2
3noinst_PROGRAMS += tox_dht_bootstrap_server_daemon 3noinst_PROGRAMS += tox_bootstrap_daemon
4 4
5tox_dht_bootstrap_server_daemon_SOURCES = \ 5tox_bootstrap_daemon_SOURCES = \
6 ../other/bootstrap_serverdaemon/tox_dht_bootstrap_server_daemon.c 6 ../other/bootstrap_serverdaemon/tox_bootstrap_daemon.c
7 7
8tox_dht_bootstrap_server_daemon_CFLAGS = \ 8tox_bootstrap_daemon_CFLAGS = \
9 -I$(top_srcdir)/other/bootstrap_serverdaemon \ 9 -I$(top_srcdir)/other/bootstrap_serverdaemon \
10 $(LIBSODIUM_CFLAGS) \ 10 $(LIBSODIUM_CFLAGS) \
11 $(NACL_CFLAGS) \ 11 $(NACL_CFLAGS) \
12 $(LIBCONFIG_CFLAGS) 12 $(LIBCONFIG_CFLAGS)
13 13
14tox_dht_bootstrap_server_daemon_LDADD = \ 14tox_bootstrap_daemon_LDADD = \
15 $(LIBSODIUM_LDFLAGS) \ 15 $(LIBSODIUM_LDFLAGS) \
16 $(NACL_LDFLAGS) \ 16 $(NACL_LDFLAGS) \
17 libtoxcore.la \ 17 libtoxcore.la \
@@ -23,5 +23,5 @@ endif
23 23
24EXTRA_DIST += \ 24EXTRA_DIST += \
25 $(top_srcdir)/other/bootstrap_serverdaemon/conf \ 25 $(top_srcdir)/other/bootstrap_serverdaemon/conf \
26 $(top_srcdir)/other/bootstrap_serverdaemon/tox_dht_bootstrap_server_daemon.sh 26 $(top_srcdir)/other/bootstrap_serverdaemon/tox_bootstrap_daemon.sh
27 \ No newline at end of file 27 \ No newline at end of file
diff --git a/other/bootstrap_serverdaemon/README.md b/other/bootstrap_serverdaemon/README.md
index 30cb14aa..53a25cdb 100644
--- a/other/bootstrap_serverdaemon/README.md
+++ b/other/bootstrap_serverdaemon/README.md
@@ -2,44 +2,44 @@
2 2
3The following commands are to be executed as root: 3The following commands are to be executed as root:
4 4
51. In `tox_dht_bootstrap_server_daemon.sh` file change: 51. In `tox_bootstrap_daemon.sh` file change:
6 - `CFG` to where your config file (`conf`) will be; read rights required 6 - `CFG` to where your config file (`conf`) will be; read rights required
7 - `DAEMON` to point to the executable 7 - `DAEMON` to point to the executable
8 - `PIDFILE` to point to a pid file daemon would have rights to create 8 - `PIDFILE` to point to a pid file daemon would have rights to create
9 9
102. Go over everything in `conf`. Make sure `pid_file_path` matches `PIDFILE` from `tox_dht_bootstrap_server_daemon.sh` 102. Go over everything in `conf`. Make sure `pid_file_path` matches `PIDFILE` from `tox_bootstrap_daemon.sh`
11 11
123. Execute: 123. Execute:
13``` 13```
14mv tox_dht_bootstrap_server_daemon.sh /etc/init.d/tox_dht_bootstrap_server_daemon 14mv tox_bootstrap_daemon.sh /etc/init.d/tox_bootstrap_daemon
15``` 15```
16*(note that we removed `.sh` ending)* 16*(note that we removed `.sh` ending)*
17 17
184. Give the right permissions to this file: 184. Give the right permissions to this file:
19``` 19```
20chmod 755 /etc/init.d/tox_dht_bootstrap_server_daemon 20chmod 755 /etc/init.d/tox_bootstrap_daemon
21``` 21```
22 22
235. Execute: 235. Execute:
24``` 24```
25update-rc.d tox_dht_bootstrap_server_daemon defaults 25update-rc.d tox_bootstrap_daemon defaults
26``` 26```
27 27
286. Start the service: 286. Start the service:
29``` 29```
30service tox_dht_bootstrap_server_daemon start 30service tox_bootstrap_daemon start
31``` 31```
32 32
337. Verify that the service is running: 337. Verify that the service is running:
34``` 34```
35service tox_dht_bootstrap_server_daemon status 35service tox_bootstrap_daemon status
36``` 36```
37 37
38-- 38--
39 39
40You can see daemon's log with 40You can see daemon's log with
41``` 41```
42grep "tox_dht_bootstrap_server_daemon" /var/log/syslog 42grep "tox_bootstrap_daemon" /var/log/syslog
43``` 43```
44 44
45**Note that system log is where you find your public key** 45**Note that system log is where you find your public key**
@@ -50,12 +50,12 @@ grep "tox_dht_bootstrap_server_daemon" /var/log/syslog
50 50
511. Check the log for errors with 511. Check the log for errors with
52``` 52```
53grep "tox_dht_bootstrap_server_daemon" /var/log/syslog 53grep "tox_bootstrap_daemon" /var/log/syslog
54``` 54```
55 55
562. Check that paths in the beginning of `/etc/init.d/tox_dht_bootstrap_server_daemon` are valid 562. Check that paths in the beginning of `/etc/init.d/tox_bootstrap_daemon` are valid
57 57
583. Make sure that `PIDFILE` from `/etc/init.d/tox_dht_bootstrap_server_daemon` matches with the `pid_file_path` from `conf` 583. Make sure that `PIDFILE` from `/etc/init.d/tox_bootstrap_daemon` matches with the `pid_file_path` from `conf`
59 59
604. Make sure you have write permission to keys and pid files 604. Make sure you have write permission to keys and pid files
61 61
diff --git a/other/bootstrap_serverdaemon/conf b/other/bootstrap_serverdaemon/conf
index 136db0f5..8451d9a0 100644
--- a/other/bootstrap_serverdaemon/conf
+++ b/other/bootstrap_serverdaemon/conf
@@ -6,13 +6,13 @@ port = 33445
6// The key file is like a password, so keep it where no one can read it. 6// The key file is like a password, so keep it where no one can read it.
7// The daemon should have permission to read/write to it. 7// The daemon should have permission to read/write to it.
8// Remember to replace the provided example with your own path. 8// Remember to replace the provided example with your own path.
9keys_file_path = "/home/tom/.tox_dht_bootstrap_server_daemon/keys" 9keys_file_path = "/home/tom/.tox_bootstrap_daemon/keys"
10 10
11// The PID file written to by daemon. 11// The PID file written to by daemon.
12// Make sure that the user who runs the daemon has permissions to write to the 12// Make sure that the user who runs the daemon has permissions to write to the
13// PID file. 13// PID file.
14// Remember to replace the provided example with your own path. 14// Remember to replace the provided example with your own path.
15pid_file_path = "/home/tom/.tox_dht_bootstrap_server_daemon/pid" 15pid_file_path = "/home/tom/.tox_bootstrap_daemon/pid"
16 16
17// Enable IPv6. 17// Enable IPv6.
18enable_ipv6 = false 18enable_ipv6 = false
diff --git a/other/bootstrap_serverdaemon/tox_dht_bootstrap_server_daemon.c b/other/bootstrap_serverdaemon/tox_bootstrap_daemon.c
index a6cffb54..e82e49cd 100644
--- a/other/bootstrap_serverdaemon/tox_dht_bootstrap_server_daemon.c
+++ b/other/bootstrap_serverdaemon/tox_bootstrap_daemon.c
@@ -1,6 +1,6 @@
1/* tox_dht_bootstrap_server_daemon 1/* tox_bootstrap_daemon.c
2 * 2 *
3 * A simple DHT bootstrap server for tox - daemon edition. 3 * Tox DHT bootstrap server daemon.
4 * 4 *
5 * Copyright (C) 2014 Tox project All Rights Reserved. 5 * Copyright (C) 2014 Tox project All Rights Reserved.
6 * 6 *
@@ -42,13 +42,13 @@
42 42
43#include "../../testing/misc_tools.c" 43#include "../../testing/misc_tools.c"
44 44
45#define DAEMON_NAME "tox_dht_bootstrap_server_daemon" 45#define DAEMON_NAME "tox_bootstrap_daemon"
46 46
47#define SLEEP_TIME_MILLISECONDS 30 47#define SLEEP_TIME_MILLISECONDS 30
48#define sleep usleep(1000*SLEEP_TIME_MILLISECONDS) 48#define sleep usleep(1000*SLEEP_TIME_MILLISECONDS)
49 49
50#define DEFAULT_PID_FILE_PATH ".tox_dht_bootstrap_server_daemon.pid" 50#define DEFAULT_PID_FILE_PATH ".tox_bootstrap_daemon.pid"
51#define DEFAULT_KEYS_FILE_PATH ".tox_dht_bootstrap_server_daemon.keys" 51#define DEFAULT_KEYS_FILE_PATH ".tox_bootstrap_daemon.keys"
52#define DEFAULT_PORT 33445 52#define DEFAULT_PORT 33445
53#define DEFAULT_ENABLE_IPV6 0 // 1 - true, 0 - false 53#define DEFAULT_ENABLE_IPV6 0 // 1 - true, 0 - false
54#define DEFAULT_ENABLE_LAN_DISCOVERY 1 // 1 - true, 0 - false 54#define DEFAULT_ENABLE_LAN_DISCOVERY 1 // 1 - true, 0 - false
diff --git a/other/bootstrap_serverdaemon/tox_dht_bootstrap_server_daemon.sh b/other/bootstrap_serverdaemon/tox_bootstrap_daemon.sh
index 678db5e3..83d9a119 100644
--- a/other/bootstrap_serverdaemon/tox_dht_bootstrap_server_daemon.sh
+++ b/other/bootstrap_serverdaemon/tox_bootstrap_daemon.sh
@@ -1,18 +1,19 @@
1#! /bin/sh 1#! /bin/sh
2### BEGIN INIT INFO 2### BEGIN INIT INFO
3# Provides: tox_dht_bootstrap_server_daemon 3# Provides: tox_bootstrap_daemon
4# Required-Start: $remote_fs $syslog 4# Required-Start: $remote_fs $syslog
5# Required-Stop: $remote_fs $syslog 5# Required-Stop: $remote_fs $syslog
6# Default-Start: 2 3 4 5 6# Default-Start: 2 3 4 5
7# Default-Stop: 0 1 6 7# Default-Stop: 0 1 6
8# Short-Description: Starts the Tox bootstrapping server 8# Short-Description: Starts the Tox DHT bootstrapping server daemon
9# Description: Starts the Tox bootstrapping server 9# Description: Starts the Tox DHT bootstrapping server daemon
10### END INIT INFO 10### END INIT INFO
11 11
12# PATH should only include /usr/* if it runs after the mountnfs.sh script 12# PATH should only include /usr/* if it runs after the mountnfs.sh script
13PATH=/sbin:/usr/sbin:/bin:/usr/bin 13PATH=/sbin:/usr/sbin:/bin:/usr/bin
14DESC="ProjectTox bootstrap server daemon" 14DESC="Tox DHT bootstrap server daemon"
15NAME=tox_dht_bootstrap_server_daemon 15NAME=tox_bootstrap_daemon
16# You may want to change USER if you are using it anywhere else
16USER=tom 17USER=tom
17CFG=/home/$USER/.$NAME/conf 18CFG=/home/$USER/.$NAME/conf
18DAEMON=/home/$USER/$NAME 19DAEMON=/home/$USER/$NAME