Files
ServerStack/core/init.sh
T
condor 679e0b4184 init
2026-07-24 18:54:53 +08:00

35 lines
1.1 KiB
Bash

#!/bin/bash
# core/init.sh - OS hardening + base dependency install
# Migrated verbatim from install.sh (lines 727-746). tee overwrite fixed to tee -a.
init_os() {
# Check binary dependencies packages
. ./lib/check_sw.sh
case "${Family}" in
"debian")
installDepsDebian 2>&1 | tee -a ${oneinstack_dir}/runtime/install.log
. core/os/init_Debian.sh 2>&1 | tee -a ${oneinstack_dir}/runtime/install.log
;;
"ubuntu")
installDepsUbuntu 2>&1 | tee -a ${oneinstack_dir}/runtime/install.log
. core/os/init_Ubuntu.sh 2>&1 | tee -a ${oneinstack_dir}/runtime/install.log
;;
esac
# Install dependencies from source package
installDepsBySrc 2>&1 | tee -a ${oneinstack_dir}/runtime/install.log
}
# core/init.sh (cont) - prereqs: OpenSSL + Jemalloc
# Migrated verbatim from install.sh (lines 748-758).
install_prereqs() {
# start Time
startTime=`date +%s`
# openSSL
Install_openSSL | tee -a ${oneinstack_dir}/runtime/install.log
# Jemalloc
if [[ ${nginx_option} =~ ^[1-3]$ ]] || [[ "${db_option}" =~ ^[1-9]$|^1[0-2]$ ]]; then
. modules/web/jemalloc.sh
Install_Jemalloc | tee -a ${oneinstack_dir}/runtime/install.log
fi
}