File size: 899 Bytes
9b205e1
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#!/bin/bash

set -e

# Function for logging
log() {
    echo "[$(date '+%Y-%m-%d %H:%M:%S')] [BASE] $*"
}

# Function for cleanup
cleanup() {
    log "Performing base installation cleanup..."
    rm -rf \
        /var/lib/apt/lists/* \
        /var/tmp/* \
        /var/log/*
    # Don't clean /tmp/* as it may contain installation scripts for other services
}

# Trap to ensure cleanup on exit
trap cleanup EXIT

log "Starting base system dependencies installation..."

log "Updating package lists..."
apt-get update

log "Installing essential system dependencies..."
apt-get install -y --no-install-recommends \
    curl \
    ca-certificates \
    gnupg \
    lsb-release \
    wget \
    unzip \
    tar \
    gzip

log "Installing process management tools..."
apt-get install -y --no-install-recommends \
    supervisor \
    gettext-base

log "Base system installation completed successfully"