mirror of
https://github.com/irungentoo/toxcore.git
synced 2024-03-22 13:30:51 +08:00
Renamed tox_bootstrap_daemon into tox-bootstrapd
This commit is contained in:
parent
bb1bb58352
commit
2040fc41d2
|
@ -1,17 +1,17 @@
|
|||
if BUILD_DHT_BOOTSTRAP_DAEMON
|
||||
|
||||
bin_PROGRAMS += tox_bootstrap_daemon
|
||||
bin_PROGRAMS += tox-bootstrapd
|
||||
|
||||
tox_bootstrap_daemon_SOURCES = \
|
||||
../other/bootstrap_daemon/tox_bootstrap_daemon.c
|
||||
tox_bootstrapd_SOURCES = \
|
||||
../other/bootstrap_daemon/tox-bootstrapd.c
|
||||
|
||||
tox_bootstrap_daemon_CFLAGS = \
|
||||
tox_bootstrapd_CFLAGS = \
|
||||
-I$(top_srcdir)/other/bootstrap_daemon \
|
||||
$(LIBSODIUM_CFLAGS) \
|
||||
$(NACL_CFLAGS) \
|
||||
$(LIBCONFIG_CFLAGS)
|
||||
|
||||
tox_bootstrap_daemon_LDADD = \
|
||||
tox_bootstrapd_LDADD = \
|
||||
$(LIBSODIUM_LDFLAGS) \
|
||||
$(NACL_LDFLAGS) \
|
||||
libtoxcore.la \
|
||||
|
@ -23,5 +23,5 @@ endif
|
|||
|
||||
EXTRA_DIST += \
|
||||
$(top_srcdir)/other/bootstrap_daemon/conf \
|
||||
$(top_srcdir)/other/bootstrap_daemon/tox_bootstrap_daemon.sh
|
||||
$(top_srcdir)/other/bootstrap_daemon/tox-bootstrapd.sh
|
||||
|
||||
|
|
|
@ -2,44 +2,44 @@
|
|||
|
||||
The following commands are to be executed as root:
|
||||
|
||||
1. In `tox_bootstrap_daemon.sh` file change:
|
||||
1. In `tox-bootstrapd.sh` file change:
|
||||
- `CFG` to where your config file (`conf`) will be; read rights required
|
||||
- `DAEMON` to point to the executable
|
||||
- `PIDFILE` to point to a pid file daemon would have rights to create
|
||||
|
||||
2. Go over everything in `conf`. Make sure `pid_file_path` matches `PIDFILE` from `tox_bootstrap_daemon.sh`
|
||||
2. Go over everything in `conf`. Make sure `pid_file_path` matches `PIDFILE` from `tox-bootstrapd.sh`
|
||||
|
||||
3. Execute:
|
||||
```
|
||||
mv tox_bootstrap_daemon.sh /etc/init.d/tox_bootstrap_daemon
|
||||
mv tox-bootstrapd.sh /etc/init.d/tox-bootstrapd
|
||||
```
|
||||
*(note that we removed `.sh` ending)*
|
||||
|
||||
4. Give the right permissions to this file:
|
||||
```
|
||||
chmod 755 /etc/init.d/tox_bootstrap_daemon
|
||||
chmod 755 /etc/init.d/tox-bootstrapd
|
||||
```
|
||||
|
||||
5. Execute:
|
||||
```
|
||||
update-rc.d tox_bootstrap_daemon defaults
|
||||
update-rc.d tox-bootstrapd defaults
|
||||
```
|
||||
|
||||
6. Start the service:
|
||||
```
|
||||
service tox_bootstrap_daemon start
|
||||
service tox-bootstrapd start
|
||||
```
|
||||
|
||||
7. Verify that the service is running:
|
||||
```
|
||||
service tox_bootstrap_daemon status
|
||||
service tox-bootstrapd status
|
||||
```
|
||||
|
||||
--
|
||||
|
||||
You can see daemon's log with
|
||||
```
|
||||
grep "tox_bootstrap_daemon" /var/log/syslog
|
||||
grep "tox-bootstrapd" /var/log/syslog
|
||||
```
|
||||
|
||||
**Note that system log is where you find your public key**
|
||||
|
@ -50,12 +50,12 @@ grep "tox_bootstrap_daemon" /var/log/syslog
|
|||
|
||||
1. Check the log for errors with
|
||||
```
|
||||
grep "tox_bootstrap_daemon" /var/log/syslog
|
||||
grep "tox-bootstrapd" /var/log/syslog
|
||||
```
|
||||
|
||||
2. Check that paths in the beginning of `/etc/init.d/tox_bootstrap_daemon` are valid
|
||||
2. Check that paths in the beginning of `/etc/init.d/tox-bootstrapd` are valid
|
||||
|
||||
3. Make sure that `PIDFILE` from `/etc/init.d/tox_bootstrap_daemon` matches with the `pid_file_path` from `conf`
|
||||
3. Make sure that `PIDFILE` from `/etc/init.d/tox-bootstrapd` matches with the `pid_file_path` from `conf`
|
||||
|
||||
4. Make sure you have write permission to keys and pid files
|
||||
|
||||
|
|
|
@ -6,13 +6,13 @@ port = 33445
|
|||
// A key file is like a password, so keep it where no one can read it.
|
||||
// The daemon should have permission to read/write to it.
|
||||
// Remember to replace the provided example with your own path.
|
||||
keys_file_path = "/home/tom/.tox_bootstrap_daemon/.tox_bootstrap_daemon.keys"
|
||||
keys_file_path = "/home/tom/.tox-bootstrapd/.tox-bootstrapd.keys"
|
||||
|
||||
// The PID file written to by daemon.
|
||||
// Make sure that the user who runs the daemon has permissions to write to the
|
||||
// PID file.
|
||||
// Remember to replace the provided example with your own path.
|
||||
pid_file_path = "/home/tom/.tox_bootstrap_daemon/.tox_bootstrap_daemon.pid"
|
||||
pid_file_path = "/home/tom/.tox-bootstrapd/.tox-bootstrapd.pid"
|
||||
|
||||
// Enable IPv6.
|
||||
enable_ipv6 = false
|
||||
|
@ -30,7 +30,7 @@ tcp_relay_ports = [443, 3389, 33445]
|
|||
// whether a node is up or not, though there are other methods of doing that.
|
||||
enable_motd = true
|
||||
|
||||
motd = "tox_bootstrap_daemon"
|
||||
motd = "tox-bootstrapd"
|
||||
|
||||
// Any number of nodes the daemon will bootstrap itself from.
|
||||
// Remember to replace the provided example with your own node list.
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* tox_bootstrap_daemon.c
|
||||
/* tox-bootstrapd.c
|
||||
*
|
||||
* Tox DHT bootstrap node daemon.
|
||||
* Tox DHT bootstrap daemon.
|
||||
*
|
||||
* Copyright (C) 2014 Tox project All Rights Reserved.
|
||||
*
|
||||
|
@ -52,14 +52,14 @@
|
|||
#include "../../testing/misc_tools.c"
|
||||
|
||||
|
||||
#define DAEMON_NAME "tox_bootstrap_daemon"
|
||||
#define DAEMON_VERSION_NUMBER 2014051800UL // yyyymmmddvv format: yyyy year, mm month, dd day, vv version change count for that day
|
||||
#define DAEMON_NAME "tox-bootstrapd"
|
||||
#define DAEMON_VERSION_NUMBER 2014081600UL // yyyymmmddvv format: yyyy year, mm month, dd day, vv version change count for that day
|
||||
|
||||
#define SLEEP_TIME_MILLISECONDS 30
|
||||
#define sleep usleep(1000*SLEEP_TIME_MILLISECONDS)
|
||||
|
||||
#define DEFAULT_PID_FILE_PATH ".tox_bootstrap_daemon.pid"
|
||||
#define DEFAULT_KEYS_FILE_PATH ".tox_bootstrap_daemon.keys"
|
||||
#define DEFAULT_PID_FILE_PATH ".tox-bootstrapd.pid"
|
||||
#define DEFAULT_KEYS_FILE_PATH ".tox-bootstrapd.keys"
|
||||
#define DEFAULT_PORT 33445
|
||||
#define DEFAULT_ENABLE_IPV6 0 // 1 - true, 0 - false
|
||||
#define DEFAULT_ENABLE_LAN_DISCOVERY 1 // 1 - true, 0 - false
|
|
@ -1,6 +1,6 @@
|
|||
#! /bin/sh
|
||||
### BEGIN INIT INFO
|
||||
# Provides: tox_bootstrap_daemon
|
||||
# Provides: tox-bootstrapd
|
||||
# Required-Start: $remote_fs $syslog
|
||||
# Required-Stop: $remote_fs $syslog
|
||||
# Default-Start: 2 3 4 5
|
||||
|
@ -12,7 +12,7 @@
|
|||
# PATH should only include /usr/* if it runs after the mountnfs.sh script
|
||||
PATH=/sbin:/usr/sbin:/bin:/usr/bin
|
||||
DESC="Tox DHT bootstrap daemon"
|
||||
NAME=tox_bootstrap_daemon
|
||||
NAME=tox-bootstrapd
|
||||
# You may want to change USER if you are using it anywhere else
|
||||
USER=tom
|
||||
CFG=/home/$USER/.$NAME/conf
|
Loading…
Reference in New Issue
Block a user