🔨 remove symlink and run api with custom paths

This commit is contained in:
Timmo 2018-10-06 22:38:37 +01:00
parent 8804b81137
commit 585a957a9e
3 changed files with 1 additions and 14 deletions

View file

@ -13,9 +13,3 @@ if [ ! -f "$config_file" ]; then
cp /etc/home-panel/home-panel-config.default.json "$config_file"
hass.log.info "Created. You should now edit this file at '$config_file'"
fi
if [ ! -f "/usr/src/api/files/config.json" ]; then
hass.log.info "Symlink config to API directory.."
mkdir -p /usr/src/api/files
ln -sf "$config_file" /usr/src/api/files/config.json
fi

View file

@ -14,10 +14,3 @@ if hass.config.true 'ssl'; then
cp "$certfile" /usr/src/api/fullchain.pem
cp "$keyfile" /usr/src/api/privkey.pem
fi
if [ ! -f "/config/home-panel.db" ]; then
hass.log.info "Symlink DB to API directory.."
touch /config/home-panel.db
mkdir -p /usr/src/api/files
ln -sf "/config/home-panel.db" /usr/src/api/files/home-panel.db
fi

View file

@ -11,4 +11,4 @@ hass.log.info "Run API.."
# shellcheck disable=SC2164
cd /usr/src/api
node index.js
DB_PATH=/config/home-panel.db CONFIG_PATH=/config/$(hass.config.get 'config_file') node index.js