refactoring (#116)

- refactoring architecture
- fix incomplete ssh logs
- code editor for scripts in the app
- remove Jobs and SSHCommands
This commit is contained in:
Saeed Vaziry
2024-03-14 20:03:43 +01:00
committed by GitHub
parent cee4a70c3c
commit 428140b931
472 changed files with 24110 additions and 8159 deletions

View File

@ -1,11 +0,0 @@
export DEBIAN_FRONTEND=noninteractive
echo "__key__" | sudo tee -a /home/root/.ssh/authorized_keys
sudo useradd -p $(openssl passwd -1 __password__) __user__
sudo usermod -aG sudo __user__
echo "__user__ ALL=(ALL) NOPASSWD:ALL" | sudo tee -a /etc/sudoers
sudo mkdir /home/__user__
sudo mkdir /home/__user__/.ssh
echo "__key__" | sudo tee -a /home/__user__/.ssh/authorized_keys
sudo chown -R __user__:__user__ /home/__user__
sudo chsh -s /bin/bash __user__
sudo su - __user__ -c "ssh-keygen -t rsa -N '' -f ~/.ssh/id_rsa" <<< y

View File

@ -1,3 +0,0 @@
if ! echo '__key__' | sudo tee -a ~/.ssh/authorized_keys; then
echo 'VITO_SSH_ERROR' && exit 1
fi

View File

@ -1,3 +0,0 @@
if ! echo "__content__" | tee __path__; then
echo 'VITO_SSH_ERROR' && exit 1
fi

View File

@ -1 +0,0 @@
ssh-keygen -t rsa -b 4096 -N "" -f ~/.ssh/__name__

View File

@ -1 +0,0 @@
cat ~/.ssh/id_rsa.pub

View File

@ -1 +0,0 @@
cat __path__;

View File

@ -1 +0,0 @@
cat ~/.ssh/__name__.pub

View File

@ -1,3 +0,0 @@
echo "Rebooting..."
sudo reboot

View File

@ -1,5 +0,0 @@
if ! cd __path__; then
echo 'VITO_SSH_ERROR' && exit 1
fi
__script__

View File

@ -1,7 +0,0 @@
sudo DEBIAN_FRONTEND=noninteractive apt clean
sudo DEBIAN_FRONTEND=noninteractive apt update
sudo DEBIAN_FRONTEND=noninteractive apt upgrade -y
sudo DEBIAN_FRONTEND=noninteractive apt autoremove -y