From 182c9eb10bac118fec755061c1775feca51d903b Mon Sep 17 00:00:00 2001 From: Disassembler Date: Tue, 19 Dec 2017 19:22:36 +0100 Subject: [PATCH] Minor script updates - Make init.d scripts executable - Change shebang from bash to sh - Alpinize zz-cleanup.sh --- 00-install.sh | 4 ++-- alpine.sh | 0 01-basic.sh => basic.sh | 3 ++- postgres.sh | 2 +- postgres/etc/init.d/postgres | 0 redis.sh | 2 +- redis/etc/init.d/redis | 0 solr.sh | 2 +- solr/etc/init.d/solr | 0 zz-cleanup.sh | 8 +++----- 10 files changed, 10 insertions(+), 11 deletions(-) mode change 100644 => 100755 alpine.sh rename 01-basic.sh => basic.sh (90%) mode change 100644 => 100755 postgres.sh mode change 100644 => 100755 postgres/etc/init.d/postgres mode change 100644 => 100755 redis/etc/init.d/redis mode change 100644 => 100755 solr/etc/init.d/solr diff --git a/00-install.sh b/00-install.sh index fa296b2..ce95833 100755 --- a/00-install.sh +++ b/00-install.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh # For production builds change to DEBUG=0 or comment the line entirely export DEBUG=1 @@ -6,7 +6,7 @@ export DEBUG=1 SOURCE_DIR=$(realpath $(dirname "${0}")) # Install shared packages and perform OS customization -${SOURCE_DIR}/01-basic.sh +${SOURCE_DIR}/basic.sh # Install applications ${SOURCE_DIR}/ckan.sh diff --git a/alpine.sh b/alpine.sh old mode 100644 new mode 100755 diff --git a/01-basic.sh b/basic.sh similarity index 90% rename from 01-basic.sh rename to basic.sh index 39b40c1..41afe10 100755 --- a/01-basic.sh +++ b/basic.sh @@ -3,7 +3,8 @@ SOURCE_DIR=$(realpath $(dirname "${0}"))/basic # Install packages -apk --no-cache add docker gettext git htop kbd-misc libressl openssh-server openssh-sftp-server postfix nginx +apk --no-cache add --virtual .useful git file htop libressl openssh-server openssh-sftp-server +apk --no-cache add docker gettext kbd-misc postfix nginx # Copy profile files and settings mkdir /root/.ssh diff --git a/postgres.sh b/postgres.sh old mode 100644 new mode 100755 index 31f6bfe..a90e444 --- a/postgres.sh +++ b/postgres.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh SOURCE_DIR=$(realpath $(dirname "${0}"))/postgres diff --git a/postgres/etc/init.d/postgres b/postgres/etc/init.d/postgres old mode 100644 new mode 100755 diff --git a/redis.sh b/redis.sh index 8cc92a4..82d4ac7 100755 --- a/redis.sh +++ b/redis.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh SOURCE_DIR=$(realpath $(dirname "${0}"))/redis # Build Docker container diff --git a/redis/etc/init.d/redis b/redis/etc/init.d/redis old mode 100644 new mode 100755 diff --git a/solr.sh b/solr.sh index e2716b2..b78fd9c 100755 --- a/solr.sh +++ b/solr.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh SOURCE_DIR=$(realpath $(dirname "${0}"))/solr diff --git a/solr/etc/init.d/solr b/solr/etc/init.d/solr old mode 100644 new mode 100755 diff --git a/zz-cleanup.sh b/zz-cleanup.sh index 30ca956..25b2113 100755 --- a/zz-cleanup.sh +++ b/zz-cleanup.sh @@ -1,12 +1,10 @@ -#!/bin/bash +#!/bin/sh # Remove packages not necessary for release -apt-get -y purge bash-completion file gcc git htop openssh-server tree uuid-runtime vim -dpkg -l | awk '{print $2}' | grep '\-dev$' | apt-get -y purge -apt-get -y --purge autoremove +apk del .useful # Clean package cache -apt-get -y clean +rm -rf /var/cache/apk/* # Remove user settings rm -rf /root/* /root/.*