diff --git a/cereal b/cereal deleted file mode 160000 index 65af4368cb84c0..00000000000000 --- a/cereal +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 65af4368cb84c03810af221f15e44b5e98ecafe9 diff --git a/jetson/install-service.sh b/jetson/install-service.sh new file mode 100644 index 00000000000000..6141c16b9102c3 --- /dev/null +++ b/jetson/install-service.sh @@ -0,0 +1,5 @@ +sudo cp /data/openpilot/jetson/openpilot.service /etc/systemd/system/openpilot.service +sudo cp /data/openpilot/jetson/openpilot.logrotate /etc/logrotate.d/openpilot +sudo systemctl daemon-reload +sudo systemctl enable openpilot +sudo systemctl start openpilot diff --git a/jetson/openpilot.logrotate b/jetson/openpilot.logrotate new file mode 100644 index 00000000000000..02c4f62cd0563f --- /dev/null +++ b/jetson/openpilot.logrotate @@ -0,0 +1,7 @@ +/var/log/openpilot.output.log /var/log/openpilot.error.log { + daily + missingok + rotate 0 + nomail + nocreate +} diff --git a/jetson/openpilot.service b/jetson/openpilot.service new file mode 100644 index 00000000000000..304b4c9cf6829b --- /dev/null +++ b/jetson/openpilot.service @@ -0,0 +1,19 @@ +[Unit] +Description=Tesla OpenPilot Driving Agent +DefaultDependencies=no + +[Service] +Type=simple +Restart=always +RestartSec=10s +User=openpilot +Group=openpilot + +WorkingDirectory=/data/openpilot/ +StandardOutput=file:/var/log/openpilot.output.log +StandardError=file:/var/log/openpilot.error.log + +ExecStart=/data/openpilot/start_op_jetson.sh +ExecStop=/usr/bin/killall -9 python +[Install] +WantedBy=multi-user.target