From aca8de1cba70a5a3ae6bca9eb92254965bae120f Mon Sep 17 00:00:00 2001 From: Franck Nijhof Date: Mon, 30 Dec 2019 10:52:49 +0100 Subject: [PATCH] Fix missing .bash_profile on fresh install, add current path to prompt (#957) * ssh: Fix for non existing .bash_profile startup error * ssh: Add current, short, path to command line prompt * ssh: Bump to 8.1, updated changelog --- ssh/CHANGELOG.md | 5 +++++ ssh/config.json | 2 +- ssh/data/hassio.sh | 2 +- ssh/data/run.sh | 1 + 4 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ssh/CHANGELOG.md b/ssh/CHANGELOG.md index c1ad19a..9024e39 100644 --- a/ssh/CHANGELOG.md +++ b/ssh/CHANGELOG.md @@ -1,5 +1,10 @@ # Changelog +## 8.1 + +- Fix for non existing .bash_profile startup error +- Add current, short, path to command line prompt + ## 8.0 - Add support for a web-based terminal via Ingress diff --git a/ssh/config.json b/ssh/config.json index 9b18166..0f785f9 100644 --- a/ssh/config.json +++ b/ssh/config.json @@ -1,6 +1,6 @@ { "name": "SSH server", - "version": "8.0", + "version": "8.1", "slug": "ssh", "description": "Allows connections over SSH", "url": "https://github.com/home-assistant/hassio-addons/tree/master/ssh", diff --git a/ssh/data/hassio.sh b/ssh/data/hassio.sh index 41f16ae..2a93649 100644 --- a/ssh/data/hassio.sh +++ b/ssh/data/hassio.sh @@ -1,3 +1,3 @@ #!/usr/bin/env bash -export PS1="\$ " +export PS1="\W \$ " cat /etc/motd diff --git a/ssh/data/run.sh b/ssh/data/run.sh index 220adbe..93fa248 100755 --- a/ssh/data/run.sh +++ b/ssh/data/run.sh @@ -58,6 +58,7 @@ if bashio::fs.file_exists /data/.bash_profile; then fi # Persist .bash_profile by redirecting .bash_profile to /data +touch /data/.bash_profile chmod 600 /data/.bash_profile ln -s -f /data/.bash_profile /root/.bash_profile