-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathmxuserbot.service
More file actions
34 lines (30 loc) · 1 KB
/
mxuserbot.service
File metadata and controls
34 lines (30 loc) · 1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# MXUserbot systemd user service configuration
#
# INSTALLATION:
# 1. Edit 'WorkingDirectory' below to match your actual project path.
# 2. Copy this file to ~/.config/systemd/user/mxuserbot.service
# 3. Reload systemd manager configuration:
# Command: systemctl --user daemon-reload
# 4. Enable and start the service:
# Command: systemctl --user enable --now mxuserbot.service
#
# USAGE:
# - View colored logs: journalctl --user -u mxuserbot.service -f -o cat
# - Restart bot: systemctl --user restart mxuserbot.service
# - Stop bot: systemctl --user stop mxuserbot.service
[Unit]
Description=MXUserbot Docker Container
After=docker.service
Requires=docker.service
[Service]
Type=simple
# Ensure the path points to your actual MXUserbot directory
WorkingDirectory=/path/to/MXUserbot
# Standard docker-compose commands for start/stop
ExecStart=/usr/bin/docker-compose up
ExecStop=/usr/bin/docker-compose down
# Automatic restart on failure after 5 seconds
Restart=always
RestartSec=5
[Install]
WantedBy=default.target