diff options
| author | maddaat <git@maddaat.org> | 2026-04-10 17:34:33 +0400 |
|---|---|---|
| committer | maddaat <git@maddaat.org> | 2026-04-10 17:34:33 +0400 |
| commit | eb670e687edcc065c2886be806acd80a697f9bea (patch) | |
| tree | f09c584c635bb817ceadf4a9ea413c01b06ef3e0 /deploy | |
| download | infra-eb670e687edcc065c2886be806acd80a697f9bea.tar infra-eb670e687edcc065c2886be806acd80a697f9bea.tar.gz infra-eb670e687edcc065c2886be806acd80a697f9bea.tar.bz2 infra-eb670e687edcc065c2886be806acd80a697f9bea.tar.lz infra-eb670e687edcc065c2886be806acd80a697f9bea.tar.xz infra-eb670e687edcc065c2886be806acd80a697f9bea.tar.zst infra-eb670e687edcc065c2886be806acd80a697f9bea.zip | |
Initial commit
Diffstat (limited to 'deploy')
| -rwxr-xr-x | deploy | 63 |
1 files changed, 63 insertions, 0 deletions
@@ -0,0 +1,63 @@ +#!/bin/sh + +set -e + +REPO="$(dirname "$(realpath "$0")")" + +. "$REPO/script/delete_dir.sh" +. "$REPO/script/delete_file.sh" +. "$REPO/script/install_dir.sh" +. "$REPO/script/install_file.sh" + +usage() { + echo ' -?, -h, --help print help' + echo ' -d, --dry dry run' + echo '--delete-obsolete delete obsolete files and dirs' +} + +DRY='' + +while [[ "$1" == -* ]]; do + case "$1" in + -h|--help|-\?) + usage + exit + ;; + -d|--dry) + DRY='YES' + ;; + --delete-obsolete) + DELETE_OBSOLETE='YES' + ;; + *) + echo "invalid option: $1" >&2 + exit 1 + ;; + esac + + shift +done + +if [ "$DRY" != 'YES' ]; then + echo '===' + pkg_add \ + bzip2 lzip xz zstd \ + curl git gnupg vim--no_x11 wget \ + cgit gitolite +fi + +. "$REPO/files.sh" + +if [ "$DRY" != 'YES' ]; then + echo '===' + rcctl restart portmap + rcctl restart httpd nfsd slowcgi sshd + + kill -KILL `cat /var/run/mountd.pid` || true + rcctl start mountd + + echo '===' + mount -av +fi + +echo '===' |
