mirror of
https://github.com/hassio-addons/addon-vscode.git
synced 2025-05-03 18:51:23 +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
|
@ -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