installer.sh: Create (s)bin directories if not available
Given that the HA prefix can be set to any path, it might be possible that we try to move a file to a non-existent dir, causing a failure. So create bin and sbin directories before.
This commit is contained in:
parent
e2a66e35d3
commit
060e21114b
1 changed files with 2 additions and 0 deletions
|
@ -214,6 +214,7 @@ docker tag "$HASSIO_DOCKER:$HASSIO_VERSION" "$HASSIO_DOCKER:latest" > /dev/null
|
|||
##
|
||||
# Install Hass.io Supervisor
|
||||
info "Install supervisor startup scripts"
|
||||
mkdir -p "${PREFIX}/sbin"
|
||||
curl -sL ${URL_BIN_HASSIO} > "${PREFIX}/sbin/hassio-supervisor"
|
||||
curl -sL ${URL_SERVICE_HASSIO} > "${SYSCONFDIR}/systemd/system/hassio-supervisor.service"
|
||||
|
||||
|
@ -252,6 +253,7 @@ systemctl start hassio-supervisor.service
|
|||
##
|
||||
# Setup CLI
|
||||
info "Installing the 'ha' cli"
|
||||
mkdir -p "${PREFIX}/bin"
|
||||
curl -sL ${URL_HA} > "${PREFIX}/bin/ha"
|
||||
chmod a+x "${PREFIX}/bin/ha"
|
||||
|
||||
|
|
Loading…
Reference in a new issue