28 lines
624 B
Desktop File
28 lines
624 B
Desktop File
[Unit]
|
|
Description=ClientX Discord Bot via NVM-Exec
|
|
After=network.target
|
|
|
|
[Service]
|
|
# Path to the Node.js executable and the entry point file.
|
|
ExecStart=/home/USER/.nvm/nvm-exec node /home/USER/clientx/index.js
|
|
|
|
# Set the working directory to your project folder.
|
|
WorkingDirectory=/home/USER/clientx
|
|
|
|
# Automatically restart process if it crashes.
|
|
Restart=on-failure
|
|
|
|
# Wait 10 seconds before attempting a restart.
|
|
RestartSec=3
|
|
|
|
# User/Group
|
|
User=USER
|
|
Group=GROUP
|
|
|
|
# Set any environment variables if needed.
|
|
Environment=NODE_ENV=production
|
|
|
|
[Install]
|
|
# Start the service on multi-user run levels.
|
|
WantedBy=multi-user.target
|