Use service log feature for robust kill/terminate

This commit is contained in:
Peter Johnson 2018-11-30 21:26:58 -08:00
parent 78f99637b9
commit 26d7b94837
No known key found for this signature in database
GPG Key ID: D39DD4DA7D41E329
3 changed files with 6 additions and 2 deletions

View File

@ -120,8 +120,10 @@ install -m 755 extfiles/rpiConfigServer "${ROOTFS_DIR}/usr/local/sbin/configServ
install -m 755 extfiles/netconsoleTee "${ROOTFS_DIR}/usr/local/bin/" install -m 755 extfiles/netconsoleTee "${ROOTFS_DIR}/usr/local/bin/"
install -v -d "${ROOTFS_DIR}/service/camera" install -v -d "${ROOTFS_DIR}/service/camera"
install -v -d "${ROOTFS_DIR}/service/camera/log"
install -m 755 files/camera_run "${ROOTFS_DIR}/service/camera/run" install -m 755 files/camera_run "${ROOTFS_DIR}/service/camera/run"
install -m 755 files/camera_log_run "${ROOTFS_DIR}/service/camera/log/run"
on_chroot << EOF on_chroot << EOF
cd /service/camera && rm -f supervise && ln -s /tmp/camera-supervise supervise cd /service/camera && rm -f supervise && ln -s /tmp/camera-supervise supervise

View File

@ -0,0 +1,2 @@
#!/bin/sh
exec /usr/local/bin/netconsoleTee -u

View File

@ -1,4 +1,4 @@
#!/bin/sh #!/bin/sh
sleep 1
cd /home/pi cd /home/pi
exec pgrphack /usr/local/bin/setuidgids pi ./runCamera 2>&1 | /usr/local/bin/netconsoleTee -u exec 2>&1
exec pgrphack /usr/local/bin/setuidgids pi ./runCamera