chore: Updated info about running as normal user.
parent
ce551b9b8b
commit
3771aa6080
|
@ -7,7 +7,7 @@
|
|||
- Restart I2P router
|
||||
- Local TCP port 7656 and UDP port 7655 should be available
|
||||
|
||||
## Recommended way to run (built from source)
|
||||
## Running as system service (recommended)
|
||||
|
||||
- Create `/etc/pboted` directory and copy example config:
|
||||
|
||||
|
@ -33,7 +33,7 @@ sudo chown -R pboted: /var/log/pboted
|
|||
sudo cp contrib/pboted.logrotate /etc/logrotate.d/pboted
|
||||
```
|
||||
|
||||
- Copy example `systemd` service file, reload daemons configuration, and start unit:
|
||||
- Copy example `systemd` unit file, reload daemons configuration, and start unit:
|
||||
|
||||
```bash
|
||||
sudo cp contrib/pboted.service /lib/systemd/system/pboted.service
|
||||
|
@ -53,7 +53,67 @@ cp contrib/pboted.conf ~/.pboted/pboted.conf
|
|||
```
|
||||
|
||||
- Edit the config to suit your needs. The file is well documented, comments will help you.
|
||||
- Now you can run application:
|
||||
- Copy example `systemd` unit file and edit paths to pboted binary, home dir, etc.):
|
||||
|
||||
```bash
|
||||
mkdir -p ~/.config/systemd/user
|
||||
cp contrib/pboted.service ~/.config/systemd/user/pboted.service
|
||||
```
|
||||
|
||||
- Unit file example for user `user`:
|
||||
|
||||
```ini
|
||||
[Unit]
|
||||
Description=I2P-Bote service written in C++
|
||||
Documentation=man:pboted(1) https://pboted.readthedocs.io/en/latest/
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
RuntimeDirectoryMode=0700
|
||||
LogsDirectoryMode=0700
|
||||
Type=forking
|
||||
|
||||
ExecStart=/home/user/.local/bin/pboted --log=file --daemon
|
||||
ExecReload=/bin/sh -c "kill -HUP $MAINPID"
|
||||
|
||||
PIDFile=/home/user/.pboted/pboted.pid
|
||||
|
||||
# Use SIGTERM to stop pboted immediately.
|
||||
KillSignal=SIGTERM
|
||||
TimeoutStopSec=3m
|
||||
SendSIGKILL=yes
|
||||
|
||||
# To enable write of coredump uncomment this
|
||||
#LimitCORE=infinity
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
```
|
||||
|
||||
- Reload services configuration:
|
||||
|
||||
```bash
|
||||
systemctl --user daemon-reload
|
||||
```
|
||||
|
||||
- Now you able to start service and set it to autostart:
|
||||
|
||||
```bash
|
||||
systemctl --user start pboted.service
|
||||
systemctl --user enable pboted.service
|
||||
```
|
||||
|
||||
## Simple way
|
||||
|
||||
- Create `~/.pboted` directory and сopy example config from `contrib/pboted.conf` to `~/.pboted/pboted.conf`:
|
||||
|
||||
```bash
|
||||
mkdir ~/.pboted
|
||||
cp contrib/pboted.conf ~/.pboted/pboted.conf
|
||||
```
|
||||
|
||||
- Edit the config to suit your needs. The file is well documented, comments will help you.
|
||||
- Now you able to run application:
|
||||
|
||||
```bash
|
||||
./pboted
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
- Перезапустите I2P маршрутизатор
|
||||
- TCP порт 7656 и UDP порт 7655 должны стать доступны
|
||||
|
||||
## Рекомендуемый способ запуска (собранного из исходников)
|
||||
## Запуск в роли системного сервиса (рекомендуется)
|
||||
|
||||
- Создайте директорию `/etc/pboted` и скопируйте образец конфигурационного файла:
|
||||
|
||||
|
@ -52,6 +52,66 @@ mkdir ~/.pboted
|
|||
cp contrib/pboted.conf ~/.pboted/pboted.conf
|
||||
```
|
||||
|
||||
- Отредайтируйте конфигурационный файл под Ваши нужды. Образец файла хорошо документирован, комментарии помогут Вам в понимании параметров.
|
||||
- Скопируйте образец `systemd` Unit-файла и отредактируйте пути:
|
||||
|
||||
```bash
|
||||
mkdir -p ~/.config/systemd/user
|
||||
cp contrib/pboted.service ~/.config/systemd/user/pboted.service
|
||||
```
|
||||
|
||||
- Пример Unit-файла для пользователя `user`:
|
||||
|
||||
```ini
|
||||
[Unit]
|
||||
Description=I2P-Bote service written in C++
|
||||
Documentation=man:pboted(1) https://pboted.readthedocs.io/en/latest/
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
RuntimeDirectoryMode=0700
|
||||
LogsDirectoryMode=0700
|
||||
Type=forking
|
||||
|
||||
ExecStart=/home/user/.local/bin/pboted --log=file --daemon
|
||||
ExecReload=/bin/sh -c "kill -HUP $MAINPID"
|
||||
|
||||
PIDFile=/home/user/.pboted/pboted.pid
|
||||
|
||||
# Use SIGTERM to stop pboted immediately.
|
||||
KillSignal=SIGTERM
|
||||
TimeoutStopSec=3m
|
||||
SendSIGKILL=yes
|
||||
|
||||
# To enable write of coredump uncomment this
|
||||
#LimitCORE=infinity
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
```
|
||||
|
||||
- Перезагрузите конфигурацию `systemd` сервисов:
|
||||
|
||||
```bash
|
||||
systemctl --user daemon-reload
|
||||
```
|
||||
|
||||
- Теперь вы можете запустить приложение как сервис пользователя и также добавить его в автозапуск:
|
||||
|
||||
```bash
|
||||
systemctl --user start pboted.service
|
||||
systemctl --user enable pboted.service
|
||||
```
|
||||
|
||||
## Простой запуск
|
||||
|
||||
- Создайте директорию `~/.pboted` и скопируйте образец файла конфигурации из `contrib/pboted.conf` в `~/.pboted/pboted.conf`:
|
||||
|
||||
```bash
|
||||
mkdir ~/.pboted
|
||||
cp contrib/pboted.conf ~/.pboted/pboted.conf
|
||||
```
|
||||
|
||||
- Отредайтируйте конфигурационный файл под Ваши нужды. Образец файла хорошо документирован, комментарии помогут Вам в понимании параметров.
|
||||
- Запустите приложение:
|
||||
|
||||
|
|
Loading…
Reference in New Issue