Create a unit /etc/systemd/system/mydaemon.service
:
[Unit]
Description=My daemon script
[Service]
ExecStart=/usr/local/bin/script.sh
Restart=on-failure
[Install]
WantedBy=multi-user.target
systemctl enable mydaemon.service
systemctl start mydaemon.service