mirror of
https://github.com/lildude/ha-addon-teslamate.git
synced 2026-10-13 21:19:16 -04:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
86fe972431 | ||
|
|
3d167fc6ee | ||
|
|
0013f5605b | ||
|
|
826c07ace9 | ||
|
|
7bfa32be3f | ||
|
|
b9e37e9f32 | ||
|
|
945a7c4822 | ||
|
|
4567555071 | ||
|
|
694b43eb93 | ||
|
|
04e01df081 | ||
|
|
d97377bc0e | ||
|
|
0aca1dd417 | ||
|
|
556a2f23af |
@@ -8,12 +8,13 @@
|
|||||||
"prBodyTemplate": "{{{table}}}{{{warnings}}}{{{notes}}}{{{changelogs}}}",
|
"prBodyTemplate": "{{{table}}}{{{warnings}}}{{{notes}}}{{{changelogs}}}",
|
||||||
"semanticCommits": "disabled",
|
"semanticCommits": "disabled",
|
||||||
"commitMessageTopic": "{{#if (containsString depName 'teslamate')}}TeslaMate{{else}}{{depName}}{{/if}}",
|
"commitMessageTopic": "{{#if (containsString depName 'teslamate')}}TeslaMate{{else}}{{depName}}{{/if}}",
|
||||||
"enabledManagers": ["custom.regex", "github-actions", "dockerfile"],
|
"enabledManagers": ["custom.regex", "github-actions"],
|
||||||
"customManagers": [
|
"customManagers": [
|
||||||
{
|
{
|
||||||
"customType": "regex",
|
"customType": "regex",
|
||||||
"fileMatch": "^build.json$",
|
"fileMatch": "^build.json$",
|
||||||
"matchStrings": [
|
"matchStrings": [
|
||||||
|
"\"teslamate/teslamate:(?<currentValue>\\d+\\.\\d+\\.\\d+)\"",
|
||||||
"\"teslamate_version\": \"(?<currentValue>\\d+\\.\\d+\\.\\d+)\""
|
"\"teslamate_version\": \"(?<currentValue>\\d+\\.\\d+\\.\\d+)\""
|
||||||
],
|
],
|
||||||
"datasourceTemplate": "github-releases",
|
"datasourceTemplate": "github-releases",
|
||||||
|
|||||||
@@ -14,19 +14,9 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: ⤵️ Check out code from GitHub
|
- name: ⤵️ Check out code from GitHub
|
||||||
uses: actions/checkout@v4.1.7
|
uses: actions/checkout@v4.2.2
|
||||||
|
|
||||||
- name: 🚀 Run Home Assistant Add-on Lint
|
- name: 🚀 Run Home Assistant Add-on Lint
|
||||||
uses: frenck/action-addon-linter@v2
|
uses: frenck/action-addon-linter@v2
|
||||||
with:
|
with:
|
||||||
path: "./"
|
path: "./"
|
||||||
|
|
||||||
- name: Check versions match
|
|
||||||
run: |
|
|
||||||
docker_ver=$(grep "FROM teslamate/teslamate" Dockerfile | cut -d':' -f2)
|
|
||||||
build_ver=$(jq -r ".args.teslamate_version" build.json)
|
|
||||||
if [ "$docker_ver" != "$build_ver" ]; then
|
|
||||||
echo -e "\033[31;1mTeslaMate versions don't match: Dockerfile => ${docker_ver} | build.json => ${build_ver}\033[0m"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
echo -e "\033[32;1mTeslaMate versions match: Dockerfile => ${docker_ver} | build.json => ${build_ver}\033[0m"
|
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout the repository
|
- name: Checkout the repository
|
||||||
uses: actions/checkout@v4.1.7
|
uses: actions/checkout@v4.2.2
|
||||||
|
|
||||||
- name: Get version
|
- name: Get version
|
||||||
run: |
|
run: |
|
||||||
@@ -42,7 +42,7 @@ jobs:
|
|||||||
password: ${{ secrets.GITHUB_TOKEN }}
|
password: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
- name: Build and publish
|
- name: Build and publish
|
||||||
uses: home-assistant/builder@2024.03.5
|
uses: home-assistant/builder@2024.08.2
|
||||||
with:
|
with:
|
||||||
args: |
|
args: |
|
||||||
--${{ matrix.arch }} \
|
--${{ matrix.arch }} \
|
||||||
|
|||||||
@@ -35,12 +35,13 @@ jobs:
|
|||||||
- name: Get TeslaMate release notes
|
- name: Get TeslaMate release notes
|
||||||
run: |
|
run: |
|
||||||
touch CHANGELOG.txt
|
touch CHANGELOG.txt
|
||||||
gh pr list --repo lildude/ha-addon-teslamate --state=merged --search="Update TeslaMate" --limit=1 --json=body --jq '.[].body' | sed -n "/<\/summary>/,/<\/details>/p" | sed '1d;$d' > changelog.tmp
|
last_release_date=$(gh release list --repo lildude/ha-addon-teslamate --limit=1 --json=publishedAt | jq -r '.[].publishedAt')
|
||||||
|
gh pr list --repo lildude/ha-addon-teslamate --state=merged --search="Update TeslaMate in:title closed:>$last_release_date" --limit=1 --json=body --jq '.[].body' | sed -n "/<\/summary>/,/<\/details>/p" | sed '1d;$d' > changelog.tmp
|
||||||
if [ -s changelog.tmp ]; then
|
if [ -s changelog.tmp ]; then
|
||||||
echo "## TeslaMate Release Notes" > CHANGELOG.txt
|
echo "## TeslaMate Release Notes" > CHANGELOG.txt
|
||||||
cat changelog.tmp >> CHANGELOG.txt
|
cat changelog.tmp >> CHANGELOG.txt
|
||||||
echo -e "---\n\n## Add-on Release Notes\n\n" >> CHANGELOG.txt
|
|
||||||
fi
|
fi
|
||||||
|
echo -e "---\n\n## Add-on Release Notes\n\n" >> CHANGELOG.txt
|
||||||
env:
|
env:
|
||||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
- name: Create tag
|
- name: Create tag
|
||||||
@@ -51,7 +52,7 @@ jobs:
|
|||||||
git push --tags
|
git push --tags
|
||||||
working-directory: ${{ github.workspace }}/teslamate
|
working-directory: ${{ github.workspace }}/teslamate
|
||||||
- name: Create release
|
- name: Create release
|
||||||
uses: softprops/action-gh-release@v2.0.7
|
uses: softprops/action-gh-release@v2.0.8
|
||||||
with:
|
with:
|
||||||
tag_name: v${{ steps.semver.outputs.semver }}
|
tag_name: v${{ steps.semver.outputs.semver }}
|
||||||
body_path: CHANGELOG.txt
|
body_path: CHANGELOG.txt
|
||||||
@@ -60,7 +61,7 @@ jobs:
|
|||||||
prerelease: false
|
prerelease: false
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
- name: Checkout addon repo
|
- name: Checkout addon repo
|
||||||
uses: actions/checkout@v4.1.7
|
uses: actions/checkout@v4.2.2
|
||||||
with:
|
with:
|
||||||
path: repo
|
path: repo
|
||||||
repository: lildude/ha-addons
|
repository: lildude/ha-addons
|
||||||
|
|||||||
@@ -32,13 +32,17 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Check out repository
|
- name: Check out repository
|
||||||
uses: actions/checkout@v4.1.7
|
uses: actions/checkout@v4.2.2
|
||||||
|
|
||||||
- name: Build add-on
|
- name: Build add-on
|
||||||
uses: home-assistant/builder@2024.03.5
|
uses: home-assistant/builder@2024.08.2
|
||||||
with:
|
with:
|
||||||
args: |
|
args: |
|
||||||
--test \
|
--test \
|
||||||
--${{ matrix.arch }} \
|
--${{ matrix.arch }} \
|
||||||
--target /data/ \
|
--target /data/ \
|
||||||
--addon
|
--addon
|
||||||
|
|
||||||
|
- name: Image labels
|
||||||
|
run: |
|
||||||
|
docker inspect ghcr.io/lildude/ha-addon-teslamate-${{ matrix.arch }} --format='{{json .Config.Labels}}' | jq
|
||||||
|
|||||||
@@ -144,7 +144,7 @@ Follow this process:
|
|||||||
[docker]: https://hub.docker.com/r/teslamate/teslamate
|
[docker]: https://hub.docker.com/r/teslamate/teslamate
|
||||||
[elixir]: https://elixir-lang.org/
|
[elixir]: https://elixir-lang.org/
|
||||||
[grafana-addon]: https://github.com/hassio-addons/addon-grafana
|
[grafana-addon]: https://github.com/hassio-addons/addon-grafana
|
||||||
[grafana-datasource]: https://raw.githubusercontent.com/lildude/hassio-addon-teslamate/main/imgs/grafana-postgres.png
|
[grafana-datasource]: https://raw.githubusercontent.com/lildude/ha-addon-teslamate/main/imgs/grafana-postgres.png
|
||||||
[mosquitto-docs]: https://github.com/home-assistant/addons/blob/master/mosquitto/DOCS.md
|
[mosquitto-docs]: https://github.com/home-assistant/addons/blob/master/mosquitto/DOCS.md
|
||||||
[samba-addon]: https://github.com/home-assistant/addons/blob/master/samba/DOCS.md
|
[samba-addon]: https://github.com/home-assistant/addons/blob/master/samba/DOCS.md
|
||||||
[ssh-addon]: https://github.com/home-assistant/addons/blob/master/ssh/DOCS.md
|
[ssh-addon]: https://github.com/home-assistant/addons/blob/master/ssh/DOCS.md
|
||||||
|
|||||||
+10
-26
@@ -1,8 +1,11 @@
|
|||||||
FROM teslamate/grafana:1.30.1 as grafana
|
ARG BUILD_FROM
|
||||||
|
ARG teslamate_version
|
||||||
|
FROM teslamate/grafana:${teslamate_version} as grafana
|
||||||
|
|
||||||
#---
|
#---
|
||||||
|
|
||||||
FROM teslamate/teslamate:1.30.1
|
ARG BUILD_FROM
|
||||||
|
FROM $BUILD_FROM
|
||||||
|
|
||||||
ARG BUILD_ARCH
|
ARG BUILD_ARCH
|
||||||
ARG BASHIO_VERSION=0.16.2
|
ARG BASHIO_VERSION=0.16.2
|
||||||
@@ -22,7 +25,6 @@ RUN \
|
|||||||
set -x \
|
set -x \
|
||||||
&& apt-get update && apt-get install -y --no-install-recommends \
|
&& apt-get update && apt-get install -y --no-install-recommends \
|
||||||
bash \
|
bash \
|
||||||
bind9utils \
|
|
||||||
ca-certificates \
|
ca-certificates \
|
||||||
curl \
|
curl \
|
||||||
jq \
|
jq \
|
||||||
@@ -30,7 +32,6 @@ RUN \
|
|||||||
postgresql-client \
|
postgresql-client \
|
||||||
tzdata \
|
tzdata \
|
||||||
xz-utils \
|
xz-utils \
|
||||||
&& rm -rf /var/lib/apt/lists/* \
|
|
||||||
&& S6_ARCH="${BUILD_ARCH}" \
|
&& S6_ARCH="${BUILD_ARCH}" \
|
||||||
&& if [ "${BUILD_ARCH}" = "amd64" ]; then S6_ARCH="x86_64"; \
|
&& if [ "${BUILD_ARCH}" = "amd64" ]; then S6_ARCH="x86_64"; \
|
||||||
elif [ "${BUILD_ARCH}" = "armv7" ]; then S6_ARCH="arm"; fi \
|
elif [ "${BUILD_ARCH}" = "armv7" ]; then S6_ARCH="arm"; fi \
|
||||||
@@ -38,33 +39,16 @@ RUN \
|
|||||||
&& curl -Ls "https://github.com/just-containers/s6-overlay/releases/download/v${S6_OVERLAY_VERSION}/s6-overlay-${S6_ARCH}.tar.xz" | tar xpJ -C / \
|
&& curl -Ls "https://github.com/just-containers/s6-overlay/releases/download/v${S6_OVERLAY_VERSION}/s6-overlay-${S6_ARCH}.tar.xz" | tar xpJ -C / \
|
||||||
&& curl -Ls "https://github.com/just-containers/s6-overlay/releases/download/v${S6_OVERLAY_VERSION}/s6-overlay-symlinks-noarch.tar.xz" | tar Jxp -C / \
|
&& curl -Ls "https://github.com/just-containers/s6-overlay/releases/download/v${S6_OVERLAY_VERSION}/s6-overlay-symlinks-noarch.tar.xz" | tar Jxp -C / \
|
||||||
&& curl -Ls "https://github.com/just-containers/s6-overlay/releases/download/v${S6_OVERLAY_VERSION}/s6-overlay-symlinks-arch.tar.xz" | tar Jxp -C / \
|
&& curl -Ls "https://github.com/just-containers/s6-overlay/releases/download/v${S6_OVERLAY_VERSION}/s6-overlay-symlinks-arch.tar.xz" | tar Jxp -C / \
|
||||||
&& mkdir -p /etc/fix-attrs.d \
|
|
||||||
&& mkdir -p /etc/services.d \
|
|
||||||
&& mkdir -p /tmp/bashio \
|
&& mkdir -p /tmp/bashio \
|
||||||
&& curl -Ls "https://github.com/hassio-addons/bashio/archive/v${BASHIO_VERSION}.tar.gz" | tar xz --strip 1 -C /tmp/bashio \
|
&& curl -Ls "https://github.com/hassio-addons/bashio/archive/v${BASHIO_VERSION}.tar.gz" | tar xz --strip 1 -C /tmp/bashio \
|
||||||
&& mv /tmp/bashio/lib /usr/lib/bashio \
|
&& mv /tmp/bashio/lib /usr/lib/bashio \
|
||||||
|
&& apt purge -y xz-utils \
|
||||||
&& ln -s /usr/lib/bashio/bashio /usr/bin/bashio \
|
&& ln -s /usr/lib/bashio/bashio /usr/bin/bashio \
|
||||||
&& rm -rf /tmp/bashio
|
&& rm -rf /var/lib/apt/lists/* /tmp/*
|
||||||
|
|
||||||
COPY --chown=root scripts/*.sh /
|
COPY rootfs /
|
||||||
RUN chmod a+x /*.sh
|
COPY --from=grafana /dashboards /dashboards
|
||||||
|
COPY --from=grafana /dashboards_internal /dashboards
|
||||||
COPY --chown=root services/teslamate/run services/teslamate/finish /etc/services.d/teslamate/
|
|
||||||
RUN chmod a+x /etc/services.d/teslamate/*
|
|
||||||
|
|
||||||
COPY --chown=root services/nginx/run services/nginx/finish /etc/services.d/nginx/
|
|
||||||
RUN chmod a+x /etc/services.d/nginx/*
|
|
||||||
|
|
||||||
COPY --chown=root services/nginx/teslamate.conf /etc/nginx/conf.d/
|
|
||||||
|
|
||||||
COPY --from=grafana --chown=root /dashboards /dashboards
|
|
||||||
COPY --from=grafana --chown=root /dashboards_internal /dashboards
|
|
||||||
|
|
||||||
# S6-Overlay
|
# S6-Overlay
|
||||||
ENTRYPOINT ["/init"]
|
ENTRYPOINT ["/init"]
|
||||||
|
|
||||||
LABEL \
|
|
||||||
org.opencontainers.image.title="Home Assistant Add-on: TeslaMate" \
|
|
||||||
org.opencontainers.image.description="A self-hosted data logger for your Tesla." \
|
|
||||||
org.opencontainers.image.source="https://github.com/lildude/ha-addon-ghostfolio/" \
|
|
||||||
org.opencontainers.image.licenses="MIT"
|
|
||||||
|
|||||||
+13
-4
@@ -1,13 +1,22 @@
|
|||||||
{
|
{
|
||||||
"build_from": {
|
"build_from": {
|
||||||
"aarch64": "teslamate/teslamate:not-used",
|
"aarch64": "teslamate/teslamate:1.31.0",
|
||||||
"amd64": "teslamate/teslamate:not-used",
|
"amd64": "teslamate/teslamate:1.31.0",
|
||||||
"armv7": "teslamate/teslamate:not-used"
|
"armv7": "teslamate/teslamate:1.31.0"
|
||||||
},
|
},
|
||||||
"args": {
|
"args": {
|
||||||
"teslamate_version": "1.30.1"
|
"teslamate_version": "1.31.0"
|
||||||
},
|
},
|
||||||
"codenotary": {
|
"codenotary": {
|
||||||
"signer": "colin@symr.io"
|
"signer": "colin@symr.io"
|
||||||
|
},
|
||||||
|
"labels":{
|
||||||
|
"maintainer": "Colin Seymour (https://github.com/lildude)",
|
||||||
|
"org.opencontainers.image.authors": "Colin Seymour (https://github.com/lildude)",
|
||||||
|
"org.opencontainers.image.description": "A self-hosted data logger for your Tesla.",
|
||||||
|
"org.opencontainers.image.documentation": "https://github.com/lildude/ha-addon-teslamate/blob/main/DOCS.md",
|
||||||
|
"org.opencontainers.image.licenses": "MIT",
|
||||||
|
"org.opencontainers.image.source": "https://github.com/lildude/ha-addon-teslamate/",
|
||||||
|
"org.opencontainers.image.title": "Home Assistant Add-on: TeslaMate"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Regular → Executable
+19
-14
@@ -11,13 +11,14 @@
|
|||||||
|
|
||||||
set -o errexit
|
set -o errexit
|
||||||
|
|
||||||
readonly HOST=$(bashio::config 'grafana_host')
|
HOST=$(bashio::config 'grafana_host')
|
||||||
readonly PORT=$(bashio::config 'grafana_port')
|
PORT=$(bashio::config 'grafana_port')
|
||||||
readonly USER=$(bashio::config 'grafana_user')
|
USER=$(bashio::config 'grafana_user')
|
||||||
readonly PASS=$(bashio::config 'grafana_pass')
|
PASS=$(bashio::config 'grafana_pass')
|
||||||
readonly DASHBOARDS_DIRECTORY="/dashboards"
|
DASHBOARDS_DIRECTORY="/dashboards"
|
||||||
readonly FOLDER_NAME=$(bashio::config 'grafana_folder_name')
|
FOLDER_NAME=$(bashio::config 'grafana_folder_name')
|
||||||
|
|
||||||
|
readonly HOST PORT USER PASS DASHBOARDS_DIRECTORY FOLDER_NAME
|
||||||
|
|
||||||
|
|
||||||
main() {
|
main() {
|
||||||
@@ -31,7 +32,6 @@ main() {
|
|||||||
restore) restore;;
|
restore) restore;;
|
||||||
*) exit 1;;
|
*) exit 1;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -42,9 +42,7 @@ backup() {
|
|||||||
dashboard_json=$(get_dashboard "$dashboard")
|
dashboard_json=$(get_dashboard "$dashboard")
|
||||||
|
|
||||||
if [[ -z "$dashboard_json" ]]; then
|
if [[ -z "$dashboard_json" ]]; then
|
||||||
echo "ERROR:
|
echo "ERROR: Couldn't retrieve dashboard $dashboard."
|
||||||
Couldn't retrieve dashboard $dashboard.
|
|
||||||
"
|
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -57,9 +55,17 @@ backup() {
|
|||||||
|
|
||||||
restore() {
|
restore() {
|
||||||
bashio::log.info "Checking for Grafana folder: $FOLDER_NAME"
|
bashio::log.info "Checking for Grafana folder: $FOLDER_NAME"
|
||||||
FLD=$(curl --silent --show-error \
|
folders=$(curl --silent --show-error \
|
||||||
--user "$LOGIN" -H "Content-Type: application/json" \
|
--user "$LOGIN" -H "Content-Type: application/json" \
|
||||||
$URL/api/folders | jq ".[] | select(.title==\"$FOLDER_NAME\")")
|
"$URL/api/folders")
|
||||||
|
|
||||||
|
if [[ $folders == *"statusCode"* ]]; then
|
||||||
|
bashio::log.error "Error getting Grafana folders: $(echo "$folders" | jq -r .message)"
|
||||||
|
bashio::log.debug "$folders"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
FLD=$(echo "$folders" | jq ".[] | select(.title==\"$FOLDER_NAME\")")
|
||||||
|
|
||||||
if [[ -z "$FLD" ]]; then
|
if [[ -z "$FLD" ]]; then
|
||||||
bashio::log.info "Not found... creating"
|
bashio::log.info "Not found... creating"
|
||||||
@@ -72,7 +78,7 @@ restore() {
|
|||||||
"$URL/api/folders")
|
"$URL/api/folders")
|
||||||
fi
|
fi
|
||||||
|
|
||||||
FOLDER_ID=$(echo $FLD | jq -r .id)
|
FOLDER_ID=$(echo "$FLD" | jq -r .id)
|
||||||
|
|
||||||
if [[ -z "$FOLDER_ID" ]]; then
|
if [[ -z "$FOLDER_ID" ]]; then
|
||||||
bashio::log.error "Could not determine Grafana folder id"
|
bashio::log.error "Could not determine Grafana folder id"
|
||||||
@@ -123,5 +129,4 @@ list_dashboards() {
|
|||||||
cut -d '/' -f2
|
cut -d '/' -f2
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
main "$@"
|
main "$@"
|
||||||
Regular → Executable
Regular → Executable
+7
-1
@@ -1,5 +1,11 @@
|
|||||||
#!/command/with-contenv bashio
|
#!/command/with-contenv bashio
|
||||||
# -*- bash -*-
|
# -*- bash -*-
|
||||||
# shellcheck shell=bash
|
# shellcheck shell=bash
|
||||||
mkdir /run/nginx
|
|
||||||
|
bashio::log.info "Starting NGINX..."
|
||||||
|
if [ -f /run/nginx ]; then
|
||||||
|
rm -f /run/nginx
|
||||||
|
fi
|
||||||
|
mkdir -p /run/nginx
|
||||||
|
|
||||||
exec nginx -g 'daemon off;error_log /proc/1/fd/1 error;'
|
exec nginx -g 'daemon off;error_log /proc/1/fd/1 error;'
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
longrun
|
||||||
Regular → Executable
Regular → Executable
+3
-3
@@ -54,14 +54,14 @@ done
|
|||||||
|
|
||||||
# Import dashboards
|
# Import dashboards
|
||||||
if bashio::config.true 'grafana_import_dashboards'; then
|
if bashio::config.true 'grafana_import_dashboards'; then
|
||||||
/dashboards.sh restore
|
/dashboards.sh restore || bashio::log.error "Failed to import dashboards"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Create the PostgreSQL database if it doesn't exist
|
# Create the PostgreSQL database if it doesn't exist
|
||||||
if pg_isready -h "$DATABASE_HOST" -p "$DATABASE_PORT" > /dev/null 2>&1; then
|
if pg_isready -h "$DATABASE_HOST" -p "$DATABASE_PORT" > /dev/null 2>&1; then
|
||||||
bashio::log.info "Creating database '$DATABASE_NAME' on $DATABASE_HOST"
|
bashio::log.info "Creating database '$DATABASE_NAME' on $DATABASE_HOST"
|
||||||
|
|
||||||
if [[ -n $(PGPASSWORD="$DATABASE_PASS" psql -h "$DATABASE_HOST" -p "$DATABASE_PORT" -U "$DATABASE_USER" postgres -Atqc "\list $DATABASE_NAME") ]]; then
|
if [[ -n $(PGPASSWORD="$DATABASE_PASS" psql -h "$DATABASE_HOST" -p "$DATABASE_PORT" -U "$DATABASE_USER" postgres -Atqc "\list \"$DATABASE_NAME\"") ]]; then
|
||||||
bashio::log.info "Database $DATABASE_NAME already exists"
|
bashio::log.info "Database $DATABASE_NAME already exists"
|
||||||
else
|
else
|
||||||
if PGPASSWORD="$DATABASE_PASS" psql -h "$DATABASE_HOST" -p "$DATABASE_PORT" -U "$DATABASE_USER" postgres -qc "CREATE DATABASE \"$DATABASE_NAME\""; then
|
if PGPASSWORD="$DATABASE_PASS" psql -h "$DATABASE_HOST" -p "$DATABASE_PORT" -U "$DATABASE_USER" postgres -qc "CREATE DATABASE \"$DATABASE_NAME\""; then
|
||||||
@@ -78,7 +78,7 @@ fi
|
|||||||
|
|
||||||
ulimit -n 1048576
|
ulimit -n 1048576
|
||||||
|
|
||||||
bashio::log.info "Starting TeslaMate"
|
bashio::log.info "Starting TeslaMate..."
|
||||||
|
|
||||||
cd /opt/app
|
cd /opt/app
|
||||||
exec $(/usr/bin/env sh) /entrypoint.sh bin/teslamate start
|
exec $(/usr/bin/env sh) /entrypoint.sh bin/teslamate start
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
longrun
|
||||||
Reference in New Issue
Block a user