test
This commit is contained in:
@@ -24,6 +24,7 @@ setup.sh # One-time server provisioning script
|
|||||||
On a fresh Rocky Linux 9 (or compatible) install:
|
On a fresh Rocky Linux 9 (or compatible) install:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
dnf install -y epel-release
|
||||||
dnf install -y git git-crypt
|
dnf install -y git git-crypt
|
||||||
git clone <repo-url> /opt
|
git clone <repo-url> /opt
|
||||||
git-crypt unlock /path/to/git-crypt-key
|
git-crypt unlock /path/to/git-crypt-key
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ set -euo pipefail
|
|||||||
# Run as root after cloning the repo to /opt/.
|
# Run as root after cloning the repo to /opt/.
|
||||||
#
|
#
|
||||||
# Usage:
|
# Usage:
|
||||||
# 1. dnf install -y git git-crypt
|
# 1. dnf install -y epel-release && dnf install -y git git-crypt
|
||||||
# 2. git clone <repo-url> /opt
|
# 2. git clone <repo-url> /opt
|
||||||
# 3. git-crypt unlock /path/to/git-crypt-key
|
# 3. git-crypt unlock /path/to/git-crypt-key
|
||||||
# 4. /opt/setup.sh
|
# 4. /opt/setup.sh
|
||||||
@@ -18,11 +18,11 @@ if [ "$(id -u)" -ne 0 ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if ! command -v git &>/dev/null; then
|
if ! command -v git &>/dev/null; then
|
||||||
errors+=("git is not installed. Run: dnf install -y git git-crypt")
|
errors+=("git is not installed. Run: dnf install -y epel-release && dnf install -y git git-crypt")
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if ! command -v git-crypt &>/dev/null; then
|
if ! command -v git-crypt &>/dev/null; then
|
||||||
errors+=("git-crypt is not installed. Run: dnf install -y git git-crypt")
|
errors+=("git-crypt is not installed. Run: dnf install -y epel-release && dnf install -y git git-crypt")
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$(pwd)" != "/opt" ] && [ "$(dirname "$(readlink -f "$0")")" != "/opt" ]; then
|
if [ "$(pwd)" != "/opt" ] && [ "$(dirname "$(readlink -f "$0")")" != "/opt" ]; then
|
||||||
@@ -37,7 +37,7 @@ if [ ${#errors[@]} -gt 0 ]; then
|
|||||||
echo "ERROR: Prerequisites not met."
|
echo "ERROR: Prerequisites not met."
|
||||||
echo ""
|
echo ""
|
||||||
echo "Please complete the initial setup before running this script:"
|
echo "Please complete the initial setup before running this script:"
|
||||||
echo " 1. dnf install -y git git-crypt"
|
echo " 1. dnf install -y epel-release && dnf install -y git git-crypt"
|
||||||
echo " 2. git clone <repo-url> /opt"
|
echo " 2. git clone <repo-url> /opt"
|
||||||
echo " 3. git-crypt unlock /path/to/git-crypt-key"
|
echo " 3. git-crypt unlock /path/to/git-crypt-key"
|
||||||
echo " 4. /opt/setup.sh"
|
echo " 4. /opt/setup.sh"
|
||||||
|
|||||||
Reference in New Issue
Block a user