ensure HOME exists
The SD card could be replaced, or it got deleted some other way. Still let git-annex start, and ensure anything that wants to write to HOME can.
This commit is contained in:
parent
b3a3273741
commit
921d04501f
1 changed files with 8 additions and 3 deletions
|
@ -101,10 +101,15 @@ run () {
|
|||
shift 1
|
||||
exec "$cmd" "$@"
|
||||
else
|
||||
# As good a start point as any.
|
||||
if $cmd test -d "$HOME"; then
|
||||
cd "$HOME"
|
||||
# Ensure home directory exists, even if it got deleted
|
||||
# somehow.
|
||||
if ! $cmd mkdir -p "$HOME"; then
|
||||
$cmd echo "mkdir of $HOME failed!"
|
||||
fi
|
||||
|
||||
# As good a start point as any.
|
||||
cd "$HOME"
|
||||
|
||||
$cmd echo "Starting webapp ..."
|
||||
$cmd nohup git annex webapp >/dev/null &
|
||||
/system/bin/sh
|
||||
|
|
Loading…
Reference in a new issue