自前アプリのデーモン化と死活監視

Restart=alwaysって書いとくとプロセスが落ちたときに再起動してくれる
sudo systemctlで列挙

/etc/systemd/system/aqua.service


[Unit]
Description=Aqua Service
After=syslog.target
[Service]
Type=simple
WorkingDirectory=/home/pi/AquaServer
ExecStart=/usr/bin/mono /home/pi/AquaServer/AquaServer.exe
TimeoutStopSec=5
StandardOutput=syslog
Restart=always
[Install]
WantedBy = multi-user.target

autostart設定手順

chromiumブラウザを全画面表示


sudo apt-get install chromium-browser x11-xserver-utils unclutter 
sudo nano /home/pi/.config/lxsession/LXDE-pi/autostart

@lxpanel --profile LXDE-pi  
@pcmanfm --desktop --profile LXDE-pi  
#@xscreensaver -no-splash  
@point-rpi  
@xset s off  
@xset -dpms  
@xset s noblank  
#@sed -i 's/"exited_cleanly": false/"exited_cleanly": true/' ~/.config/chromium/Default/Preferences  
@chromium-browser --kiosk http://ipadrs/hogehoge.htm --incognito