From d26b670ac06889381b058d6c9c334fbe87d434b6 Mon Sep 17 00:00:00 2001 From: Steven Uggowitzer Date: Wed, 12 Jan 2022 11:53:44 +0000 Subject: [PATCH] Update 'aos-alpine-homer-base-install.sh' --- aos-alpine-homer-base-install.sh | 26 ++++++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/aos-alpine-homer-base-install.sh b/aos-alpine-homer-base-install.sh index 915e356..83f854f 100755 --- a/aos-alpine-homer-base-install.sh +++ b/aos-alpine-homer-base-install.sh @@ -1,20 +1,17 @@ #!/bin/bash +pkg_path=http://aos-np-prod-1:aos-np-prod-1@git.eshift.org/AoS_Digital_Health_Platform/aos-homer-ke-prod.git ## Update Alpine to latest things and make good to work with docker. apk update;apk upgrade --update-cache --available apk add --no-cache bash -apk add docker-engine docker-compose docker-cli docker fuse-overlayfs -# These are likely needed for many things run by pip -apk add py-pip libffi-dev openssl-dev gcc libc-dev make - ## Core AoS things we want on this kind of lxc apk add sed attr dialog bash bash-completion grep apk add util-linux binutils findutils readline apk add lsof less nano curl glances - - apk add openssh +apk add procps + rc-update add sshd rc-service sshd start rc-service sshd status @@ -23,5 +20,22 @@ apk add nodejs npm apk add xsel apk add yarn apk add git +yarn global add serve + + +adduser -D -g 'AoS Dashboard' --shell /bin/ash homer +su -c "cd /home/homer; git clone $pkg_path /home/homer/aos-dashboard" -s /bin/sh homer +cat > /etc/crontabs/root << 'EOF' +# do daily/weekly/monthly maintenance +# min hour day month weekday command +*/15 * * * * run-parts /etc/periodic/15min +0 * * * * run-parts /etc/periodic/hourly +0 2 * * * run-parts /etc/periodic/daily +0 3 * * 6 run-parts /etc/periodic/weekly +0 5 1 * * run-parts /etc/periodic/monthly +@reboot su -c "cd /home/homer/aos-dashboard/homer && /usr/bin/npx serve --no-clipboard 2>&1 > /dev/null &" -s /bin/sh homer +0 0 * 0 0 su -c "cd /home/homer/aos-dashboard/homer && git pull 2>&1 > /dev/null &" -s /bin/sh homer +EOF +chmod 600 /etc/crontabs/root \ No newline at end of file