From d2f4e431d1ee9f51d7b538054e2f8afe91dbb367 Mon Sep 17 00:00:00 2001 From: royjr Date: Thu, 16 Jan 2025 23:32:12 -0500 Subject: [PATCH] op start stop restart --- tools/op.sh | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/tools/op.sh b/tools/op.sh index f0f1308d44..7a06be56a6 100755 --- a/tools/op.sh +++ b/tools/op.sh @@ -337,6 +337,21 @@ function op_switch() { git submodule foreach git clean -df } +function op_start() { + op_before_cmd + op_run_command sudo systemctl start comma $@ +} + +function op_stop() { + op_before_cmd + op_run_command sudo systemctl stop comma $@ +} + +function op_restart() { + op_before_cmd + op_run_command sudo systemctl restart comma $@ +} + function op_default() { echo "An openpilot helper" echo "" @@ -359,6 +374,9 @@ function op_default() { echo -e " ${BOLD}build${NC} Run the openpilot build system in the current working directory" echo -e " ${BOLD}install${NC} Install the 'op' tool system wide" echo -e " ${BOLD}switch${NC} Switch to a different git branch with a clean slate (nukes any changes)" + echo -e " ${BOLD}start${NC} Starts openpilot" + echo -e " ${BOLD}stop${NC} Stops openpilot" + echo -e " ${BOLD}restart${NC} Restarts openpilot" echo "" echo -e "${BOLD}${UNDERLINE}Commands [Tooling]:${NC}" echo -e " ${BOLD}juggle${NC} Run PlotJuggler"