Create a custom systemd service
From DevOps Notebook
# vim /etc/systemd/system/myservice.service
Created script content
[Unit] Description=My systemd service. [Service] Type=simple ExecStart=/bin/bash /usr/bin/my_service.sh [Install] WantedBy=multi-user.target
Reload systemd and start script
# systemctl daemon-reload # systemctl start myservice.service # systemctl enable myservice.service # start on boot