Created
January 18, 2026 16:51
-
-
Save bossjones/c7ec84f37d9f26b74966843bf25c2f92 to your computer and use it in GitHub Desktop.
systemd service for cerebro-botv3
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/zsh | |
| # Load pyenv | |
| source "/home/pi/.local/share/chezmoi/home/shell/pyenv/env.zsh" | |
| source "/home/pi/.local/share/chezmoi/home/shell/pyenv/path.zsh" | |
| # Change to bot directory | |
| cd /home/pi/dev/universityofprofessorex/cerebro-botv3 | |
| # Activate the virtual environment | |
| pyenv activate cerebro-bot3910 | |
| # Load environment variables | |
| source /home/pi/dev/universityofprofessorex/cerebro-botv3/.envrc | |
| # Run the bot | |
| exec cerebroctl run |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [Unit] | |
| Description=Cerebro Bot v3 | |
| After=network-online.target | |
| Wants=network-online.target | |
| [Service] | |
| Type=simple | |
| User=pi | |
| Group=pi | |
| WorkingDirectory=/home/pi/dev/universityofprofessorex/cerebro-botv3 | |
| ExecStart=/home/pi/bin/cerebro-botv3-start.sh | |
| Restart=on-failure | |
| RestartSec=10 | |
| # Hardening options | |
| NoNewPrivileges=true | |
| PrivateTmp=true | |
| # Environment | |
| Environment="HOME=/home/pi" | |
| Environment="PYENV_ROOT=/home/pi/.pyenv" | |
| [Install] | |
| WantedBy=multi-user.target |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment