mirror of
https://github.com/hassio-addons/addon-vscode.git
synced 2025-05-07 04:31:24 +00:00
Common directories in /root like SSH add-on (#197)
This commit is contained in:
parent
09203fde74
commit
a9323fe970
2 changed files with 10 additions and 1 deletions
|
@ -62,7 +62,9 @@ you are troubleshooting.
|
|||
|
||||
This option allows you to override the default path the add-on will open
|
||||
when accessing the web interface. For example, use a different
|
||||
configuration directory like `/share/myconfig` instead of `/config`.
|
||||
configuration directory like `/share/myconfig` instead of `/config`. If set
|
||||
to `/root` then all the common folders of HA such as `/config`, `/ssl`,
|
||||
`/share`, etc. will appear as subfolders for each access.
|
||||
|
||||
When not configured, the addon will automatically use the default: `/config`
|
||||
|
||||
|
|
|
@ -3,11 +3,18 @@
|
|||
# Home Assistant Community Add-on: Visual Studio Code
|
||||
# Persists user settings and installs custom user packages.
|
||||
# ==============================================================================
|
||||
readonly -a DIRECTORIES=(addons backup config media share ssl)
|
||||
readonly GIT_USER_PATH=/data/git
|
||||
readonly SSH_USER_PATH=/data/.ssh
|
||||
readonly ZSH_HISTORY_FILE=/root/.zsh_history
|
||||
readonly ZSH_HISTORY_PERSISTANT_FILE=/data/.zsh_history
|
||||
|
||||
# Links some common directories to the user's home folder for convenience
|
||||
for dir in "${DIRECTORIES[@]}"; do
|
||||
ln -s "/${dir}" "${HOME}/${dir}" \
|
||||
|| bashio::log.warning "Failed linking common directory: ${dir}"
|
||||
done
|
||||
|
||||
# Store SSH settings in add-on data folder
|
||||
if ! bashio::fs.directory_exists "${SSH_USER_PATH}"; then
|
||||
mkdir -p "${SSH_USER_PATH}" \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue