Add systemd service configuration
This commit is contained in:
29
buttonrefreshbot.service
Normal file
29
buttonrefreshbot.service
Normal file
@@ -0,0 +1,29 @@
|
||||
[Unit]
|
||||
Description=Button Refresh Bot - Telegram bot that removes reply keyboard buttons
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
# Update these to match your system user and group
|
||||
User=YOUR_USERNAME
|
||||
Group=YOUR_GROUP
|
||||
# Update this to the absolute path of your project directory
|
||||
WorkingDirectory=/path/to/Buttonrefreshbot
|
||||
Environment="NODE_ENV=production"
|
||||
# Update this path to point to your .env file
|
||||
EnvironmentFile=/path/to/Buttonrefreshbot/.env
|
||||
# Update this path to your node executable (use 'which node' to find it)
|
||||
ExecStart=/usr/bin/node /path/to/Buttonrefreshbot/bot.js
|
||||
Restart=always
|
||||
RestartSec=10
|
||||
StandardOutput=journal
|
||||
StandardError=journal
|
||||
SyslogIdentifier=buttonrefreshbot
|
||||
|
||||
# Security settings
|
||||
NoNewPrivileges=true
|
||||
PrivateTmp=true
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
||||
Reference in New Issue
Block a user