2014-01-19 15:50:44 +08:00
|
|
|
##Instructions for Debian
|
2014-01-19 13:43:31 +08:00
|
|
|
|
|
|
|
The following commands are to be executed as root:
|
|
|
|
|
2014-01-20 06:21:24 +08:00
|
|
|
1. In `tox_dht_bootstrap_server_daemon.sh` file change:
|
2014-01-19 13:43:31 +08:00
|
|
|
- `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
|
|
|
|
|
2014-01-20 06:21:24 +08:00
|
|
|
2. Go over everything in `conf`. Make sure `pid_file_path` matches `PIDFILE` from `tox_dht_bootstrap_server_daemon.sh`
|
2014-01-19 13:43:31 +08:00
|
|
|
|
2014-01-19 15:50:44 +08:00
|
|
|
3. Execute:
|
|
|
|
```
|
2014-01-20 06:21:24 +08:00
|
|
|
mv tox_dht_bootstrap_server_daemon.sh /etc/init.d/tox_dht_bootstrap_server_daemon
|
2014-01-19 15:50:44 +08:00
|
|
|
```
|
2014-01-20 06:21:24 +08:00
|
|
|
*(note that we removed `.sh` ending)*
|
2014-01-19 13:43:31 +08:00
|
|
|
|
2014-01-19 15:50:44 +08:00
|
|
|
4. Give the right permissions to this file:
|
|
|
|
```
|
2014-01-19 17:04:11 +08:00
|
|
|
chmod 755 /etc/init.d/tox_dht_bootstrap_server_daemon
|
2014-01-19 15:50:44 +08:00
|
|
|
```
|
2014-01-19 13:43:31 +08:00
|
|
|
|
2014-01-19 15:50:44 +08:00
|
|
|
5. Execute:
|
|
|
|
```
|
2014-01-19 17:04:11 +08:00
|
|
|
update-rc.d tox_dht_bootstrap_server_daemon defaults
|
2014-01-19 15:50:44 +08:00
|
|
|
```
|
2014-01-19 13:43:31 +08:00
|
|
|
|
2014-01-19 15:50:44 +08:00
|
|
|
6. Start the service:
|
|
|
|
```
|
2014-01-19 17:04:11 +08:00
|
|
|
service tox_dht_bootstrap_server_daemon start
|
2014-01-19 15:50:44 +08:00
|
|
|
```
|
2014-01-19 13:43:31 +08:00
|
|
|
|
2014-01-19 15:50:44 +08:00
|
|
|
7. Verify that the service is running:
|
|
|
|
```
|
2014-01-19 17:04:11 +08:00
|
|
|
service tox_dht_bootstrap_server_daemon status
|
2014-01-19 15:50:44 +08:00
|
|
|
```
|
2014-01-19 13:43:31 +08:00
|
|
|
|
2014-01-19 15:50:44 +08:00
|
|
|
--
|
2014-01-19 13:43:31 +08:00
|
|
|
|
2014-01-19 15:50:44 +08:00
|
|
|
You can see daemon's log with
|
|
|
|
```
|
2014-01-19 17:04:11 +08:00
|
|
|
grep "tox_dht_bootstrap_server_daemon" /var/log/syslog
|
2014-01-19 15:50:44 +08:00
|
|
|
```
|
2014-01-19 13:43:31 +08:00
|
|
|
|
2014-01-19 15:50:44 +08:00
|
|
|
**Note that system log is where you find your public key**
|
|
|
|
|
|
|
|
--
|
|
|
|
|
|
|
|
###Troubleshooting:
|
|
|
|
|
|
|
|
1. Check the log for errors with
|
|
|
|
```
|
2014-01-19 17:04:11 +08:00
|
|
|
grep "tox_dht_bootstrap_server_daemon" /var/log/syslog
|
2014-01-19 15:50:44 +08:00
|
|
|
```
|
2014-01-19 13:43:31 +08:00
|
|
|
|
2014-01-19 17:04:11 +08:00
|
|
|
2. Check that paths in the beginning of `/etc/init.d/tox_dht_bootstrap_server_daemon` are valid
|
2014-01-19 13:43:31 +08:00
|
|
|
|
2014-01-19 17:04:11 +08:00
|
|
|
3. Make sure that `PIDFILE` from `/etc/init.d/tox_dht_bootstrap_server_daemon` matches with the `pid_file_path` from `conf`
|
2014-01-19 13:43:31 +08:00
|
|
|
|
2014-01-20 02:55:15 +08:00
|
|
|
4. Make sure you have write permission to keys and pid files
|
2014-01-19 13:43:31 +08:00
|
|
|
|
2014-01-20 02:55:15 +08:00
|
|
|
5. Make sure you have read permission for config file
|