setup-forgejo/forgejo-dependencies.sh

31 lines
504 B
Bash
Raw Permalink Normal View History

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