@the_dragonlord I don't remember if I did the file or get on the web but you have to make duetbot as a service with a file "duetbot.service" or whatever into /etc/systemd/system as root
File content (edited):
[Unit]
Description=node js duetbot for telegram
#after network is up
After=network.target
[Service]
WorkingDirectory=/usr/bin
ExecStart=duetbot
Restart=on-failure
RestartSec=1500ms
Type=forking
#user pi or root, will determine where the script will search the configuration file **.duetbot.json**
User=pi
# Note Debian/Ubuntu uses 'nogroup', RHEL/Fedora uses 'nobody'
Group=nogroup
Environment=PATH=/usr/bin:/usr/local/bin
Environment=NODE_ENV=production
# log send to syslog
StandardOutput=syslog
StandardError=syslog
# syslog name id
SyslogIdentifier=duetbot
[Install]
WantedBy=multi-user.target
And don't forget to execute after that :
#to load the file for the systemctl manager
systemctl daemon-reload
# to start and test
service duetbot start
# to check if loaded an active
service duetbot status
# if all is good you can tell the system to execute it as a service on boot :
systemctl enable duetbot
#if it's ok the system will respond :
Created symlink /etc/systemd/system/multi-user.target.wants/duetbot.service → /etc/systemd/system/duetbot.service.