Skip to content

Commit

Permalink
forgot to update postinstall configmap
Browse files Browse the repository at this point in the history
  • Loading branch information
v1nsai committed Dec 8, 2024
1 parent f344ea0 commit 3bf7790
Showing 1 changed file with 14 additions and 6 deletions.
20 changes: 14 additions & 6 deletions apps/services/devbox/app/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,21 @@ data:
postinstall.sh: "#!/bin/bash\n\nset -e\n\n# if the file /postinstall-has-run exists,
then the postinstall script has already run and exit gracefully\nif [ -f /postinstall-has-run
]; then\n exit 0\nfi\n\napt update\napt install -y openssh-server vim unminimize
sudo nnn git\nunminimize\n\n# ssh\necho \"PermitRootLogin no\" >> /etc/ssh/sshd_config\necho
\"PasswordAuthentication no\" >> /etc/ssh/sshd_config\nservice ssh restart\n\n#
user\nadduser --disabled-password --gecos \"\" $USERNAME\necho \"$USERNAME ALL=(ALL)
NOPASSWD:ALL\" >> /etc/sudoers\ncp /authorized_keys /home/$USERNAME/.ssh/authorized_keys\nchown
sudo nnn git wget\necho -e \"y\\n\" | unminimize\n\n# ssh\necho \"PermitRootLogin
no\" >> /etc/ssh/sshd_config\necho \"PasswordAuthentication no\" >> /etc/ssh/sshd_config\nservice
ssh restart\n\n# user\nadduser --disabled-password --gecos \"\" $USERNAME\necho
\"$USERNAME ALL=(ALL) NOPASSWD:ALL\" >> /etc/sudoers\ncp /authorized_keys /home/$USERNAME/.ssh/authorized_keys\nchown
$USERNAME:$USERNAME /home/$USERNAME/.ssh/authorized_keys\nchmod 600 /home/$USERNAME/.ssh/authorized_keys\n\n#
node \n\n\n\n# If everything runs successfully, don't bother running next startup\ntouch
/postinstall-has-run"
docker\n# Add Docker's official GPG key:\nsudo apt-get update\nsudo apt-get install
ca-certificates curl\nsudo install -m 0755 -d /etc/apt/keyrings\nsudo curl -fsSL
https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc\nsudo
chmod a+r /etc/apt/keyrings/docker.asc\n\n# Add the repository to Apt sources:\necho
\\\n \"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc]
https://download.docker.com/linux/ubuntu \\\n $(. /etc/os-release && echo \"$VERSION_CODENAME\")
stable\" | \\\n sudo tee /etc/apt/sources.list.d/docker.list > /dev/null\nsudo
apt-get update \n\n# Node\ncurl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh
| bash\nnvm install 18\nnvm use 18\n\n# If everything runs successfully, don't
bother running next startup\ntouch /postinstall-has-run"
kind: ConfigMap
metadata:
creationTimestamp: null
Expand Down

0 comments on commit 3bf7790

Please sign in to comment.