Remove debug mode and move relevant files to zz-build

This commit is contained in:
Disassembler 2018-10-27 21:19:57 +02:00
parent afe8df823f
commit 1060651116
Signed by: Disassembler
GPG Key ID: 524BD33A0EE29499
6 changed files with 13 additions and 47 deletions

View File

@ -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

View File

@ -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

View File

@ -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