Initial add-on code

This commit is contained in:
Franck Nijhof 2019-03-24 23:43:22 +01:00
parent 416e586602
commit 344e8f48be
No known key found for this signature in database
GPG key ID: D62583BA8AB11CA3
20 changed files with 810 additions and 0 deletions

View file

@ -0,0 +1,17 @@
#!/usr/bin/with-contenv bashio
# ==============================================================================
# Community Hass.io Add-ons: Visual Studio Code
# Sets up the users .ssh folder to be persistent
# ==============================================================================
readonly SSH_USER_PATH=/data/.ssh
if ! bashio::fs.directory_exists "${SSH_USER_PATH}"; then
mkdir -p "${SSH_USER_PATH}" \
|| bashio::exit.nok 'Failed to create a persistent .ssh folder'
chmod 700 "${SSH_USER_PATH}" \
|| bashio::exit.nok \
'Failed setting permissions on persistent .ssh folder'
fi
ln -s "${SSH_USER_PATH}" ~/.ssh