mirror of
https://github.com/kou029w/fogtype.com
synced 2025-01-17 23:55:02 +00:00
refactor install script
This commit is contained in:
parent
4f8f5f2eda
commit
afbf317e04
1 changed files with 10 additions and 10 deletions
20
install
20
install
|
@ -5,28 +5,28 @@ REPO=${REPO:-git@github.com:kou029w/fogtype.com.git}
|
|||
REMOTE_HOST=${REMOTE_HOST:-fogtype.com}
|
||||
PACKAGES="docker-ce docker-compose-plugin tailscale"
|
||||
|
||||
eval "$(
|
||||
apt-config shell APT_CONF_DIR Dir::Etc::parts/d
|
||||
apt-config shell APT_SOURCES_DIR Dir::Etc::sourceparts/d
|
||||
)"
|
||||
|
||||
sudo apt-get update -qq
|
||||
DEBIAN_FRONTEND=noninteractive \
|
||||
sudo apt-get install -y -qq git rsync
|
||||
DEBIAN_FRONTEND=noninteractive sudo apt-get install -y -qq git rsync
|
||||
|
||||
git clone "${REPO}" "${HOME}/${REMOTE_HOST}" ||
|
||||
git pull --rebase
|
||||
git -C "${HOME}/${REMOTE_HOST}" pull --rebase
|
||||
|
||||
cd "${HOME}/${REMOTE_HOST}"
|
||||
|
||||
sudo rsync -r etc/apt/keyrings/ /usr/share/keyrings/
|
||||
eval "$(apt-config shell APT_CONF_DIR 'Dir::Etc::parts/d')"
|
||||
sudo rsync -r etc/apt/apt.conf.d/ "${APT_CONF_DIR}"
|
||||
eval "$(apt-config shell APT_SOURCES_DIR 'Dir::Etc::sourceparts/d')"
|
||||
sudo rsync -r etc/apt/sources.list.d/ "${APT_SOURCES_DIR}"
|
||||
|
||||
sudo rsync -r etc/docker/ /etc/docker/
|
||||
|
||||
cd -
|
||||
|
||||
sudo apt-get update -qq
|
||||
# shellcheck disable=SC2086
|
||||
DEBIAN_FRONTEND=noninteractive \
|
||||
sudo apt-get install -y -qq ${PACKAGES}
|
||||
DEBIAN_FRONTEND=noninteractive sudo apt-get install -y -qq ${PACKAGES}
|
||||
|
||||
sudo gpasswd -a "$(whoami)" docker
|
||||
|
||||
cd -
|
||||
|
|
Loading…
Add table
Reference in a new issue