mirror of
https://github.com/hassio-addons/addon-vscode.git
synced 2025-05-03 18:51:23 +00:00
✨ Initial add-on code
This commit is contained in:
parent
416e586602
commit
344e8f48be
20 changed files with 810 additions and 0 deletions
17
vscode/rootfs/etc/cont-init.d/50-user-ssh-folder.sh
Normal file
17
vscode/rootfs/etc/cont-init.d/50-user-ssh-folder.sh
Normal 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
|
Loading…
Add table
Add a link
Reference in a new issue