#コマンドの作成
sudo vi /lib/systemd/system/test.service
[Service]
WorkingDirectory=/home/usrname/test
ExecStart=/usr/bin/python testing.py
Restart=always
RestartSec=60s
#RestartSecはプログラムが終了したら60秒後に再起動
#起動
sudo systemctl start test
#停止
sudo systemctl stop test
#ログを見る
sudo journalctl -u test
参考になったサイト
http://unix.stackexchange.com/questions/107939/how-to-restart-the-python-script-automatically-if-it-is-killed-or-dies
https://wiki.ubuntu.com/SystemdForUpstartUsers