|
|
2 сар өмнө | |
|---|---|---|
| .. | ||
| user | 2 сар өмнө | |
| README.md | 6 сар өмнө | |
This directory contains systemd user service files for managing SmartBotic processes.
Link or copy the service files to your user systemd directory:
mkdir -p ~/.config/systemd/user
ln -sf /data/smartbotic/systemd/user/*.service ~/.config/systemd/user/
ln -sf /data/smartbotic/systemd/user/*.target ~/.config/systemd/user/
Reload systemd to pick up the new services:
systemctl --user daemon-reload
systemctl --user start smartbotic.target
systemctl --user start smartbotic-database
systemctl --user start smartbotic-webserver
systemctl --user start smartbotic-runner
systemctl --user stop smartbotic.target
systemctl --user stop smartbotic-runner
systemctl --user stop smartbotic-webserver
systemctl --user stop smartbotic-database
systemctl --user restart smartbotic-webserver
systemctl --user restart smartbotic-runner
systemctl --user status smartbotic-database
systemctl --user status smartbotic-webserver
systemctl --user status smartbotic-runner
# Follow logs for a specific service
journalctl --user -u smartbotic-webserver -f
# View last 100 lines
journalctl --user -u smartbotic-runner -n 100
# View all SmartBotic logs
journalctl --user -u 'smartbotic-*' -f
systemctl --user enable smartbotic.target
systemctl --user disable smartbotic.target
smartbotic-database
↓
smartbotic-webserver
↓
smartbotic-runner
The services have proper dependency ordering:
smartbotic-database must start firstsmartbotic-webserver depends on database and starts after itsmartbotic-runner depends on webserver and starts after itYou can override environment variables in the service files or create an override:
systemctl --user edit smartbotic-runner
Add your overrides:
[Service]
Environment=LOG_LEVEL=debug
Environment=RUNNER_ID=my-runner
If services fail to start, check the logs:
journalctl --user -u smartbotic-database -e
journalctl --user -u smartbotic-webserver -e
journalctl --user -u smartbotic-runner -e
Common issues: