fix: bootstrap .profile and .gitconfig on fresh PVC
This commit is contained in:
@@ -14,13 +14,33 @@ fi
|
|||||||
|
|
||||||
# Bootstrap home dir on fresh PVC
|
# Bootstrap home dir on fresh PVC
|
||||||
if [ ! -f /root/.bashrc ]; then
|
if [ ! -f /root/.bashrc ]; then
|
||||||
cp /etc/skel/.bashrc /root/.bashrc 2>/dev/null || cat > /root/.bashrc <<'EOF'
|
cp /etc/skel/.bashrc /root/.bashrc 2>/dev/null || true
|
||||||
|
cat >> /root/.bashrc <<'EOF'
|
||||||
export PATH="/root/.bun/bin:$PATH"
|
export PATH="/root/.bun/bin:$PATH"
|
||||||
export HISTFILE=/root/.bash_history
|
export HISTFILE=/root/.bash_history
|
||||||
export HISTSIZE=10000
|
export HISTSIZE=10000
|
||||||
EOF
|
EOF
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ ! -f /root/.profile ]; then
|
||||||
|
cat > /root/.profile <<'EOF'
|
||||||
|
export PATH="/root/.bun/bin:$PATH"
|
||||||
|
[ -f /root/.bashrc ] && . /root/.bashrc
|
||||||
|
EOF
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ ! -f /root/.gitconfig ]; then
|
||||||
|
cat > /root/.gitconfig <<'EOF'
|
||||||
|
[user]
|
||||||
|
name = ryan
|
||||||
|
email = ryan@lunartech.com
|
||||||
|
[init]
|
||||||
|
defaultBranch = main
|
||||||
|
[core]
|
||||||
|
editor = code --wait
|
||||||
|
EOF
|
||||||
|
fi
|
||||||
|
|
||||||
# Start SSH daemon
|
# Start SSH daemon
|
||||||
/usr/sbin/sshd
|
/usr/sbin/sshd
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user