Remove debug mode and move relevant files to zz-build
This commit is contained in:
parent
afe8df823f
commit
1060651116
@ -1,37 +1,11 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
# For production builds change to DEBUG=0 or comment the line entirely
|
|
||||||
export DEBUG=1
|
|
||||||
|
|
||||||
cd $(realpath $(dirname "${0}"))
|
cd $(realpath $(dirname "${0}"))
|
||||||
|
|
||||||
# Install shared packages and perform OS customization
|
# Install basic packages and perform OS customization
|
||||||
./basic.sh
|
./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
|
# Clean package cache
|
||||||
rm -rf /var/cache/apk/*
|
rm -rf /var/cache/apk/*
|
||||||
# Remove root settings
|
# Remove root settings
|
||||||
|
18
basic.sh
18
basic.sh
@ -9,18 +9,6 @@ cp etc/apk/keys/repokey.rsa.pub /etc/apk/keys/repokey.rsa.pub
|
|||||||
|
|
||||||
# Install packages
|
# 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
|
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
|
# Copy boot configuration
|
||||||
cp boot/extlinux.conf /boot/extlinux.conf
|
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
|
rc-update add ${SERVICE} boot
|
||||||
service ${SERVICE} start
|
service ${SERVICE} start
|
||||||
done
|
done
|
||||||
|
|
||||||
# Configure services for DEBUG mode
|
|
||||||
if [ ${DEBUG:-0} -eq 1 ]; then
|
|
||||||
rc-update add sshd boot
|
|
||||||
service sshd start
|
|
||||||
fi
|
|
||||||
|
@ -3,9 +3,19 @@ set -e
|
|||||||
|
|
||||||
cd $(realpath $(dirname "${0}"))
|
cd $(realpath $(dirname "${0}"))
|
||||||
|
|
||||||
# Install Alpine SDK
|
# Install Alpine SDK and useful tools
|
||||||
apk update
|
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
|
# Prepare build toolchain
|
||||||
adduser root abuild
|
adduser root abuild
|
||||||
|
Loading…
Reference in New Issue
Block a user