Files
ha-addon-teslamate/services/teslamate/finish
T
Colin Seymour 64f0213e30 Fix database check and creation (#23)
* Refactor db check and create

* Make exit more accurate
2024-07-18 16:20:36 +01:00

16 lines
342 B
Bash

#!/command/with-contenv bashio
# -*- bash -*-
# shellcheck shell=bash
if [[ "${1}" -ne 0 ]] && [[ "${1}" -ne 256 ]]; then
case "${1}" in
1)
bashio::log.error "TeslaMate encountered an error, halting add-on"
;;
*)
bashio::log.error "TeslaMate crashed, halting add-on"
;;
esac
/run/s6/basedir/bin/halt
fi