diff options
Diffstat (limited to 'other')
-rw-r--r-- | other/bootstrap_daemon/Makefile.inc | 12 | ||||
-rw-r--r-- | other/bootstrap_daemon/README.md | 22 | ||||
-rw-r--r-- | other/bootstrap_daemon/conf | 6 | ||||
-rw-r--r-- | other/bootstrap_daemon/tox-bootstrapd.c (renamed from other/bootstrap_daemon/tox_bootstrap_daemon.c) | 12 | ||||
-rw-r--r-- | other/bootstrap_daemon/tox-bootstrapd.sh (renamed from other/bootstrap_daemon/tox_bootstrap_daemon.sh) | 4 |
5 files changed, 28 insertions, 28 deletions
diff --git a/other/bootstrap_daemon/Makefile.inc b/other/bootstrap_daemon/Makefile.inc index 0bc02ef9..f3d9c04e 100644 --- a/other/bootstrap_daemon/Makefile.inc +++ b/other/bootstrap_daemon/Makefile.inc | |||
@@ -1,17 +1,17 @@ | |||
1 | if BUILD_DHT_BOOTSTRAP_DAEMON | 1 | if BUILD_DHT_BOOTSTRAP_DAEMON |
2 | 2 | ||
3 | bin_PROGRAMS += tox_bootstrap_daemon | 3 | bin_PROGRAMS += tox-bootstrapd |
4 | 4 | ||
5 | tox_bootstrap_daemon_SOURCES = \ | 5 | tox_bootstrapd_SOURCES = \ |
6 | ../other/bootstrap_daemon/tox_bootstrap_daemon.c | 6 | ../other/bootstrap_daemon/tox-bootstrapd.c |
7 | 7 | ||
8 | tox_bootstrap_daemon_CFLAGS = \ | 8 | tox_bootstrapd_CFLAGS = \ |
9 | -I$(top_srcdir)/other/bootstrap_daemon \ | 9 | -I$(top_srcdir)/other/bootstrap_daemon \ |
10 | $(LIBSODIUM_CFLAGS) \ | 10 | $(LIBSODIUM_CFLAGS) \ |
11 | $(NACL_CFLAGS) \ | 11 | $(NACL_CFLAGS) \ |
12 | $(LIBCONFIG_CFLAGS) | 12 | $(LIBCONFIG_CFLAGS) |
13 | 13 | ||
14 | tox_bootstrap_daemon_LDADD = \ | 14 | tox_bootstrapd_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 | ||
24 | EXTRA_DIST += \ | 24 | EXTRA_DIST += \ |
25 | $(top_srcdir)/other/bootstrap_daemon/conf \ | 25 | $(top_srcdir)/other/bootstrap_daemon/conf \ |
26 | $(top_srcdir)/other/bootstrap_daemon/tox_bootstrap_daemon.sh | 26 | $(top_srcdir)/other/bootstrap_daemon/tox-bootstrapd.sh |
27 | 27 | ||
diff --git a/other/bootstrap_daemon/README.md b/other/bootstrap_daemon/README.md index 53a25cdb..d13c0415 100644 --- a/other/bootstrap_daemon/README.md +++ b/other/bootstrap_daemon/README.md | |||
@@ -2,44 +2,44 @@ | |||
2 | 2 | ||
3 | The following commands are to be executed as root: | 3 | The following commands are to be executed as root: |
4 | 4 | ||
5 | 1. In `tox_bootstrap_daemon.sh` file change: | 5 | 1. In `tox-bootstrapd.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 | ||
10 | 2. Go over everything in `conf`. Make sure `pid_file_path` matches `PIDFILE` from `tox_bootstrap_daemon.sh` | 10 | 2. Go over everything in `conf`. Make sure `pid_file_path` matches `PIDFILE` from `tox-bootstrapd.sh` |
11 | 11 | ||
12 | 3. Execute: | 12 | 3. Execute: |
13 | ``` | 13 | ``` |
14 | mv tox_bootstrap_daemon.sh /etc/init.d/tox_bootstrap_daemon | 14 | mv tox-bootstrapd.sh /etc/init.d/tox-bootstrapd |
15 | ``` | 15 | ``` |
16 | *(note that we removed `.sh` ending)* | 16 | *(note that we removed `.sh` ending)* |
17 | 17 | ||
18 | 4. Give the right permissions to this file: | 18 | 4. Give the right permissions to this file: |
19 | ``` | 19 | ``` |
20 | chmod 755 /etc/init.d/tox_bootstrap_daemon | 20 | chmod 755 /etc/init.d/tox-bootstrapd |
21 | ``` | 21 | ``` |
22 | 22 | ||
23 | 5. Execute: | 23 | 5. Execute: |
24 | ``` | 24 | ``` |
25 | update-rc.d tox_bootstrap_daemon defaults | 25 | update-rc.d tox-bootstrapd defaults |
26 | ``` | 26 | ``` |
27 | 27 | ||
28 | 6. Start the service: | 28 | 6. Start the service: |
29 | ``` | 29 | ``` |
30 | service tox_bootstrap_daemon start | 30 | service tox-bootstrapd start |
31 | ``` | 31 | ``` |
32 | 32 | ||
33 | 7. Verify that the service is running: | 33 | 7. Verify that the service is running: |
34 | ``` | 34 | ``` |
35 | service tox_bootstrap_daemon status | 35 | service tox-bootstrapd status |
36 | ``` | 36 | ``` |
37 | 37 | ||
38 | -- | 38 | -- |
39 | 39 | ||
40 | You can see daemon's log with | 40 | You can see daemon's log with |
41 | ``` | 41 | ``` |
42 | grep "tox_bootstrap_daemon" /var/log/syslog | 42 | grep "tox-bootstrapd" /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_bootstrap_daemon" /var/log/syslog | |||
50 | 50 | ||
51 | 1. Check the log for errors with | 51 | 1. Check the log for errors with |
52 | ``` | 52 | ``` |
53 | grep "tox_bootstrap_daemon" /var/log/syslog | 53 | grep "tox-bootstrapd" /var/log/syslog |
54 | ``` | 54 | ``` |
55 | 55 | ||
56 | 2. Check that paths in the beginning of `/etc/init.d/tox_bootstrap_daemon` are valid | 56 | 2. Check that paths in the beginning of `/etc/init.d/tox-bootstrapd` are valid |
57 | 57 | ||
58 | 3. Make sure that `PIDFILE` from `/etc/init.d/tox_bootstrap_daemon` matches with the `pid_file_path` from `conf` | 58 | 3. Make sure that `PIDFILE` from `/etc/init.d/tox-bootstrapd` matches with the `pid_file_path` from `conf` |
59 | 59 | ||
60 | 4. Make sure you have write permission to keys and pid files | 60 | 4. Make sure you have write permission to keys and pid files |
61 | 61 | ||
diff --git a/other/bootstrap_daemon/conf b/other/bootstrap_daemon/conf index c05beff1..80f2293d 100644 --- a/other/bootstrap_daemon/conf +++ b/other/bootstrap_daemon/conf | |||
@@ -6,13 +6,13 @@ port = 33445 | |||
6 | // A key file is like a password, so keep it where no one can read it. | 6 | // A 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. |
9 | keys_file_path = "/home/tom/.tox_bootstrap_daemon/.tox_bootstrap_daemon.keys" | 9 | keys_file_path = "/home/tom/.tox-bootstrapd/.tox-bootstrapd.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. |
15 | pid_file_path = "/home/tom/.tox_bootstrap_daemon/.tox_bootstrap_daemon.pid" | 15 | pid_file_path = "/home/tom/.tox-bootstrapd/.tox-bootstrapd.pid" |
16 | 16 | ||
17 | // Enable IPv6. | 17 | // Enable IPv6. |
18 | enable_ipv6 = false | 18 | enable_ipv6 = false |
@@ -30,7 +30,7 @@ tcp_relay_ports = [443, 3389, 33445] | |||
30 | // whether a node is up or not, though there are other methods of doing that. | 30 | // whether a node is up or not, though there are other methods of doing that. |
31 | enable_motd = true | 31 | enable_motd = true |
32 | 32 | ||
33 | motd = "tox_bootstrap_daemon" | 33 | motd = "tox-bootstrapd" |
34 | 34 | ||
35 | // Any number of nodes the daemon will bootstrap itself from. | 35 | // Any number of nodes the daemon will bootstrap itself from. |
36 | // Remember to replace the provided example with your own node list. | 36 | // Remember to replace the provided example with your own node list. |
diff --git a/other/bootstrap_daemon/tox_bootstrap_daemon.c b/other/bootstrap_daemon/tox-bootstrapd.c index 5f8f9f76..0e17b94b 100644 --- a/other/bootstrap_daemon/tox_bootstrap_daemon.c +++ b/other/bootstrap_daemon/tox-bootstrapd.c | |||
@@ -1,6 +1,6 @@ | |||
1 | /* tox_bootstrap_daemon.c | 1 | /* tox-bootstrapd.c |
2 | * | 2 | * |
3 | * Tox DHT bootstrap node daemon. | 3 | * Tox DHT bootstrap daemon. |
4 | * | 4 | * |
5 | * Copyright (C) 2014 Tox project All Rights Reserved. | 5 | * Copyright (C) 2014 Tox project All Rights Reserved. |
6 | * | 6 | * |
@@ -52,14 +52,14 @@ | |||
52 | #include "../../testing/misc_tools.c" | 52 | #include "../../testing/misc_tools.c" |
53 | 53 | ||
54 | 54 | ||
55 | #define DAEMON_NAME "tox_bootstrap_daemon" | 55 | #define DAEMON_NAME "tox-bootstrapd" |
56 | #define DAEMON_VERSION_NUMBER 2014051800UL // yyyymmmddvv format: yyyy year, mm month, dd day, vv version change count for that day | 56 | #define DAEMON_VERSION_NUMBER 2014081600UL // yyyymmmddvv format: yyyy year, mm month, dd day, vv version change count for that day |
57 | 57 | ||
58 | #define SLEEP_TIME_MILLISECONDS 30 | 58 | #define SLEEP_TIME_MILLISECONDS 30 |
59 | #define sleep usleep(1000*SLEEP_TIME_MILLISECONDS) | 59 | #define sleep usleep(1000*SLEEP_TIME_MILLISECONDS) |
60 | 60 | ||
61 | #define DEFAULT_PID_FILE_PATH ".tox_bootstrap_daemon.pid" | 61 | #define DEFAULT_PID_FILE_PATH ".tox-bootstrapd.pid" |
62 | #define DEFAULT_KEYS_FILE_PATH ".tox_bootstrap_daemon.keys" | 62 | #define DEFAULT_KEYS_FILE_PATH ".tox-bootstrapd.keys" |
63 | #define DEFAULT_PORT 33445 | 63 | #define DEFAULT_PORT 33445 |
64 | #define DEFAULT_ENABLE_IPV6 0 // 1 - true, 0 - false | 64 | #define DEFAULT_ENABLE_IPV6 0 // 1 - true, 0 - false |
65 | #define DEFAULT_ENABLE_LAN_DISCOVERY 1 // 1 - true, 0 - false | 65 | #define DEFAULT_ENABLE_LAN_DISCOVERY 1 // 1 - true, 0 - false |
diff --git a/other/bootstrap_daemon/tox_bootstrap_daemon.sh b/other/bootstrap_daemon/tox-bootstrapd.sh index 787498ec..39589b5e 100644 --- a/other/bootstrap_daemon/tox_bootstrap_daemon.sh +++ b/other/bootstrap_daemon/tox-bootstrapd.sh | |||
@@ -1,6 +1,6 @@ | |||
1 | #! /bin/sh | 1 | #! /bin/sh |
2 | ### BEGIN INIT INFO | 2 | ### BEGIN INIT INFO |
3 | # Provides: tox_bootstrap_daemon | 3 | # Provides: tox-bootstrapd |
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 |
@@ -12,7 +12,7 @@ | |||
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 |
13 | PATH=/sbin:/usr/sbin:/bin:/usr/bin | 13 | PATH=/sbin:/usr/sbin:/bin:/usr/bin |
14 | DESC="Tox DHT bootstrap daemon" | 14 | DESC="Tox DHT bootstrap daemon" |
15 | NAME=tox_bootstrap_daemon | 15 | NAME=tox-bootstrapd |
16 | # You may want to change USER if you are using it anywhere else | 16 | # You may want to change USER if you are using it anywhere else |
17 | USER=tom | 17 | USER=tom |
18 | CFG=/home/$USER/.$NAME/conf | 18 | CFG=/home/$USER/.$NAME/conf |