/opt/hello.shReturn Jun/29/2015 AM 08:15/etc/systemd/system/hello.service#!/bin/bash # # hello.sh # while true do echo hello world >> /tmp/hello.log date >> /tmp/hello.log sleep 1 done起動[Unit] Description = hello daemon [Service] ExecStart = /opt/hello.sh Restart = always Type = simple [Install] WantedBy = multi-user.target
# systemctl start hello