From 060e21114b50c0dfc1246c6d368faef485962372 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Date: Tue, 29 Dec 2020 00:07:49 +0100 Subject: [PATCH] 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. --- installer.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/installer.sh b/installer.sh index e019c0c..95ef239 100644 --- a/installer.sh +++ b/installer.sh @@ -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"