setup-forgejo/forgejo-dependencies.sh

30 lines
484 B
Bash
Raw Normal View History

2023-03-25 12:36:27 -04:00
#!/bin/bash
2023-04-01 05:08:06 -04:00
# SPDX-License-Identifier: MIT
2023-03-25 12:36:27 -04:00
set -x
2023-05-21 16:58:27 -04:00
source $(dirname $0)/lxc-helpers-lib.sh
2023-05-16 19:02:22 -04:00
2023-03-29 18:27:54 -04:00
: ${LXC_IP_PREFIX:=10.0.8}
2023-03-25 14:14:55 -04:00
2023-03-25 12:36:27 -04:00
function install_docker() {
if ! systemctl is-active --quiet docker; then
2023-05-16 19:02:22 -04:00
lxc_install_docker_inside
2023-03-25 12:36:27 -04:00
fi
}
function install_other() {
2023-05-16 19:02:22 -04:00
local packages="sudo git"
2023-03-25 12:36:27 -04:00
if ! which $packages ; then
apt-get install -y -qq $packages
fi
}
function setup() {
install_other
2023-03-25 12:36:27 -04:00
install_docker
2023-05-16 19:02:22 -04:00
lxc_install_lxc_inside $LXC_IP_PREFIX
2023-03-25 12:36:27 -04:00
}
"${@:-setup}"