diff --git a/00-install.sh b/00-install.sh index d8780d6..b616ddc 100755 --- a/00-install.sh +++ b/00-install.sh @@ -1,37 +1,11 @@ #!/bin/sh set -e -# For production builds change to DEBUG=0 or comment the line entirely -export DEBUG=1 - cd $(realpath $(dirname "${0}")) -# Install shared packages and perform OS customization +# Install basic packages and perform OS customization ./basic.sh -./basic-runtimes.sh -# Install applications -./ckan.sh -# ./crisiscleanup.sh -# ./cts.sh -./frontlinesms.sh -./gnuhealth.sh -./kanboard.sh -./mifosx.sh -./motech.sh -./opendatakit-build.sh -./opendatakit.sh -./openmapkit.sh -./pandora.sh -./sahana.sh -./sahana-demo.sh -./sambro.sh -./seeddms.sh -./sigmah.sh -./ushahidi.sh - -# Perform cleanup only if DEBUG mode is not set -[ ${DEBUG:-0} -eq 1 ] && exit 0 # Clean package cache rm -rf /var/cache/apk/* # Remove root settings diff --git a/basic.sh b/basic.sh index cfcc832..7dee8c5 100755 --- a/basic.sh +++ b/basic.sh @@ -9,18 +9,6 @@ cp etc/apk/keys/repokey.rsa.pub /etc/apk/keys/repokey.rsa.pub # Install packages apk --no-cache add ca-certificates curl bridge e2fsprogs-extra gettext iptables kbd-misc libcap libressl libseccomp postfix python3 py3-bcrypt py3-cffi py3-cryptography py3-dnspython py3-jinja2 py3-requests py3-six py3-werkzeug nginx util-linux acme-sh@vm lxc@vm -if [ ${DEBUG:-0} -eq 1 ]; then - # Install some utilities for DEBUG mode - apk --no-cache add git file htop less openssh-server openssh-sftp-server tar xz -fi - -# Copy root profile files and settings for DEBUG mode -if [ ${DEBUG:-0} -eq 1 ]; then - mkdir -p /root/.config/htop /root/.ssh - cp root/.profile /root/.profile - cp root/.ssh/authorized_keys /root/.ssh/authorized_keys - cp root/.config/htop/htoprc /root/.config/htop/htoprc -fi # Copy boot configuration cp boot/extlinux.conf /boot/extlinux.conf @@ -66,9 +54,3 @@ for SERVICE in cgroups consolefont crond iptables nginx ntpd postfix swap vmmgr; rc-update add ${SERVICE} boot service ${SERVICE} start done - -# Configure services for DEBUG mode -if [ ${DEBUG:-0} -eq 1 ]; then - rc-update add sshd boot - service sshd start -fi diff --git a/zz-build/install-toolchain.sh b/zz-build/install-toolchain.sh index 3f6dfea..1f9b379 100755 --- a/zz-build/install-toolchain.sh +++ b/zz-build/install-toolchain.sh @@ -3,9 +3,19 @@ set -e cd $(realpath $(dirname "${0}")) -# Install Alpine SDK +# Install Alpine SDK and useful tools apk update -apk add alpine-sdk +apk add alpine-sdk git file htop less openssh-server openssh-sftp-server tar xz + +# Copy root profile files and settings +mkdir -p /root/.config/htop /root/.ssh +cp root/.profile /root/.profile +cp root/.ssh/authorized_keys /root/.ssh/authorized_keys +cp root/.config/htop/htoprc /root/.config/htop/htoprc + +# Start SSH +rc-update add sshd boot +service sshd start # Prepare build toolchain adduser root abuild diff --git a/basic/root/.config/htop/htoprc b/zz-build/root/.config/htop/htoprc similarity index 100% rename from basic/root/.config/htop/htoprc rename to zz-build/root/.config/htop/htoprc diff --git a/basic/root/.profile b/zz-build/root/.profile similarity index 100% rename from basic/root/.profile rename to zz-build/root/.profile diff --git a/basic/root/.ssh/authorized_keys b/zz-build/root/.ssh/authorized_keys similarity index 100% rename from basic/root/.ssh/authorized_keys rename to zz-build/root/.ssh/authorized_keys