This commit is contained in:
2022-06-19 20:57:23 +03:00
parent 1465642d4f
commit 26b2b02d30

View File

@@ -4,6 +4,7 @@ if [ "$(ls /home |grep saret)" != "saret" ]; then
sudo adduser --gecos "" --disabled-password $username
sudo chpasswd <<<"$username:$password"
sudo usermod -aG sudo $username
sudo reboot
fi
sudo apt -y update
sudo apt -y install wget nano curl zsh git lsb-release apt-transport-https --allow-unauthenticated
@@ -81,8 +82,8 @@ EOF
source ~/.zshrc
sudo apt -y update
sudo apt -y full-upgrade --allow-unauthenticated
bash <curl -sSL https://gist.github.com/hannesbe/6c110e9de6644f07a48eecfdbe6b728d/raw
bash <(curl -sSL https://gist.github.com/hannesbe/6c110e9de6644f07a48eecfdbe6b728d/raw)
# bash <curl -sSL https://gist.github.com/hannesbe/6c110e9de6644f07a48eecfdbe6b728d/raw
sh -c <$(curl -sSL https://gist.github.com/hannesbe/6c110e9de6644f07a48eecfdbe6b728d/raw)
sudo tee /etc/apt/sources.list.d/notaesalexp.list<<EOF
deb https://notesalexp.org/tesseract-ocr5/$(lsb_release -cs)/ $(lsb_release -cs) main
EOF
@@ -91,14 +92,41 @@ EOF
sudo apt -y install ocrmypdf python3-pip jbig2enc jbig2dec imagemagick
sudo mkdir /usr/share/tesseract-ocr/5/tessdata
wget https://raw.githubusercontent.com/tesseract-ocr/tessdata/main/deu_frak.traineddata -O /usr/share/tesseract-ocr/5/tessdata/
bash <curl -sSL https://dot.net/v1/dotnet-install.sh
sh -c <$(curl -sSL https://dot.net/v1/dotnet-install.sh)
fi
if [ "$HOST" = "libre-computer" ];
then
su -c 'wget -O - "https://connect.jfrog.io/install_connect" | sh -s VBr9r2byCYKNaE3rgZwYZANg8BueGk3HAQ Server'
sudo printf "\\u005b\\u0055\\u006e\\u0069\\u0074\\u005d\\n\\u0044\\u0065\\u0073\\u0063\\u0072\\u0069\\u0070\\u0074\\u0069\\u006f\\u006e\\u003d\\u0052\\u0075\\u006e\\u0020\\u0054\\u0068\\u0069\\u0073\\u0020\\u0053\\u0053\\u0048\\u0020\\u0069\\u006e\\u0020\\u0073\\u0073\\u0068\\u002d\\u006a\\u0020\\u0073\\u0065\\u0072\\u0076\\u0065\\u0072\\n\\u0041\\u0066\\u0074\\u0065\\u0072\\u003d\\u006e\\u0065\\u0074\\u0077\\u006f\\u0072\\u006b\\u002e\\u0074\\u0061\\u0072\\u0067\\u0065\\u0074\\n\\n\\u005b\\u0053\\u0065\\u0072\\u0076\\u0069\\u0063\\u0065\\u005d\\n\\u0054\\u0079\\u0070\\u0065\\u003d\\u0073\\u0069\\u006d\\u0070\\u006c\\u0065\\n\\u0045\\u0078\\u0065\\u0063\\u0053\\u0074\\u0061\\u0072\\u0074\\u003d\\u0073\\u0073\\u0068\\u0020\\u0073\\u0061\\u0072\\u0065\\u0074\\u0040\\u0073\\u0073\\u0068\\u002d\\u006a\\u002e\\u0063\\u006f\\u006d\\u0020\\u002d\\u004e\\u0020\\u002d\\u0052\\u0020\\u006c\\u0069\\u0062\\u0072\\u0065\\u002d\\u0063\\u006f\\u006d\\u0070\\u0075\\u0074\\u0065\\u0072\\u003a\\u0032\\u0032\\u003a\\u006c\\u006f\\u0063\\u0061\\u006c\\u0068\\u006f\\u0073\\u0074\\u003a\\u0032\\u0032\\n\\n\\u005b\\u0049\\u006e\\u0073\\u0074\\u0061\\u006c\\u006c\\u005d\\n\\u0057\\u0061\\u006e\\u0074\\u0065\\u0064\\u0042\\u0079\\u003d\\u006d\\u0075\\u006c\\u0074\\u0069\\u002d\\u0075\\u0073\\u0065\\u0072\\u002e\\u0074\\u0061\\u0072\\u0067\\u0065\\u0074" >/etc/systemd/system/RunSSH.service
sudo printf "\\u005b\\u0055\\u006e\\u0069\\u0074\\u005d\\n\\u0044\\u0065\\u0073\\u0063\\u0072\\u0069\\u0070\\u0074\\u0069\\u006f\\u006e\\u003d\\u0052\\u0075\\u006e\\u0020\\u0047\\u006f\\u006f\\u0067\\u006c\\u0065\\u0020\\u0064\\u0072\\u0069\\u0076\\u0065\\u0020\\u0066\\u006f\\u006c\\u0064\\u0065\\u0072\\u002c\\u0020\\u0061\\u006e\\u0064\\u0020\\u006d\\u006f\\u0075\\u006e\\u0074\\u0020\\u0069\\u0074\\u002e\\n\\u0041\\u0066\\u0074\\u0065\\u0072\\u003d\\u006e\\u0065\\u0074\\u0077\\u006f\\u0072\\u006b\\u002e\\u0074\\u0061\\u0072\\u0067\\u0065\\u0074\\n\\n\\u005b\\u0053\\u0065\\u0072\\u0076\\u0069\\u0063\\u0065\\u005d\\n\\u0054\\u0079\\u0070\\u0065\\u003d\\u0073\\u0069\\u006d\\u0070\\u006c\\u0065\\n\\u0045\\u0078\\u0065\\u0063\\u0053\\u0074\\u0061\\u0072\\u0074\\u003d\\u0067\\u006f\\u006f\\u0067\\u006c\\u0065\\u002d\\u0064\\u0072\\u0069\\u0076\\u0065\\u002d\\u006f\\u0063\\u0061\\u006d\\u006c\\u0066\\u0075\\u0073\\u0065\\u0020\\u007e\\u002f\\u0047\\u006f\\u006f\\u0067\\u006c\\u0065\\u0044\\u0072\\u0069\\u0076\\u0065\\u002f\\n\\n\\u005b\\u0049\\u006e\\u0073\\u0074\\u0061\\u006c\\u006c\\u005d\\n\\u0057\\u0061\\u006e\\u0074\\u0065\\u0064\\u0042\\u0079\\u003d\\u006d\\u0075\\u006c\\u0074\\u0069\\u002d\\u0075\\u0073\\u0065\\u0072\\u002e\\u0074\\u0061\\u0072\\u0067\\u0065\\u0074" >/etc/systemd/system/GoogleDrive.service
sudo tee /etc/systemd/system/RunSSH.service <<EOF
[Unit]
Description=Run This SSH in ssh-j server
After=network.target
[Service]
Type=simple
ExecStart=sh /Scripts/ssh.sh
[Install]
WantedBy=multi-user.target
EOF
sudo mkdir /Scripts
sudo tee /Scripts/ssh.sh <<EOF
ssh saret@ssh-j.com -N -R libre-computer:22:localhost:22
EOF
sudo tee /etc/systemd/system/GoogleDrive.service <<EOF
[Unit]
Description=Run Google drive folder, and mount it.
After=network.target
[Service]
Type=simple
ExecStart=google-drive-ocamlfuse ~/GoogleDrive/
User=saret
[Install]
WantedBy=multi-user.target
EOF
sudo systemctl enable GoogleDrive
sudo systemctl enable RunSSH
fi