27 lines
652 B
SYSTEMD
27 lines
652 B
SYSTEMD
|
|
[Unit]
|
||
|
|
Description=ClientX Discord Bot
|
||
|
|
After=network.target
|
||
|
|
|
||
|
|
[Service]
|
||
|
|
# Path to the Node.js executable and the entry point file.
|
||
|
|
ExecStart=/usr/bin/node /root/clientx/index.js
|
||
|
|
|
||
|
|
# Set the working directory to your project folder.
|
||
|
|
WorkingDirectory=/root/clientx
|
||
|
|
|
||
|
|
# Automatically restart process if it crashes.
|
||
|
|
Restart=always
|
||
|
|
# Wait 10 seconds before attempting a restart.
|
||
|
|
RestartSec=10
|
||
|
|
|
||
|
|
# Run as a non-root user for security (change "nodeuser" to your configured user).
|
||
|
|
#User=root
|
||
|
|
#Group=root
|
||
|
|
|
||
|
|
# Set any environment variables if needed.
|
||
|
|
Environment=NODE_ENV=production
|
||
|
|
|
||
|
|
[Install]
|
||
|
|
# Start the service on multi-user run levels.
|
||
|
|
WantedBy=multi-user.target
|