Update many stuff, see toDo
Took 9 seconds
This commit is contained in:
@ -6,7 +6,7 @@ if [ "$EUID" -ne 0 ]; then
|
||||
fi
|
||||
|
||||
echo "Creating user if not exists"
|
||||
adduser itender || true
|
||||
useradd -p $(openssl passwd -1 iTender2022) itender || true
|
||||
|
||||
echo "Updating indexes"
|
||||
apt update
|
||||
@ -52,6 +52,13 @@ echo "Installing mongodb and yarn..."
|
||||
apt install nodejs yarn mongodb-org -y
|
||||
apt upgrade -y
|
||||
|
||||
# V2: Arduino CLI
|
||||
echo "Installing arduino-cli..."
|
||||
sudo -u itender mkdir -p /home/itender/bin
|
||||
sudo -u itender sh -c 'curl -fsSL https://raw.githubusercontent.com/arduino/arduino-cli/master/install.sh | BINDIR=/home/itender/bin/ sh'
|
||||
sudo -u itender /home/itender/bin/arduino-cli config init
|
||||
sudo -u itender /home/itender/bin/arduino-cli core update-index || true
|
||||
|
||||
echo "Installing autostart..."
|
||||
# Autostart
|
||||
cat <<EOT >/etc/xdg/openbox/autostart
|
||||
@ -98,7 +105,8 @@ if [ -d "$DIR" ]; then
|
||||
git pull
|
||||
else
|
||||
echo "Cloning..."
|
||||
sudo git config --global credential.helper store || exit
|
||||
sudo -u itender git config --global credential.helper store
|
||||
git config --global credential.helper store
|
||||
git clone "https://tobiash:!IwedwrimmVeudiweN!@git.gaminggeneration.de/tobiash/itender.git" --quiet
|
||||
fi
|
||||
cd "$DIR" || exit
|
||||
@ -139,6 +147,7 @@ WantedBy=multi-user.target
|
||||
EOT
|
||||
#sh -c "git pull --quiet || true"
|
||||
|
||||
|
||||
echo "Activating systemctl daemons..."
|
||||
systemctl daemon-reload
|
||||
systemctl enable mongod
|
||||
@ -178,6 +187,7 @@ if ! grep -w "gpu_freq=700" /boot/config.txt; then
|
||||
echo "gpu_freq=700" >>/boot/config.txt
|
||||
fi
|
||||
|
||||
|
||||
echo "Setting no-logo..."
|
||||
systemctl disable getty@tty1.service
|
||||
|
||||
@ -191,7 +201,7 @@ if ! grep -w "logo.nologo" /boot/cmdline.txt; then
|
||||
sed -i 's/console=tty0/console=tty3/' /boot/cmdline.txt
|
||||
fi
|
||||
|
||||
echo "iTender 2022
|
||||
echo "iTender© 2022-2023
|
||||
Programmed by Tobias Hopp" >/etc/motd
|
||||
|
||||
echo "[Service]
|
||||
@ -201,4 +211,6 @@ chown itender:itender -R /home/itender/
|
||||
adduser itender gpio
|
||||
adduser itender sudo
|
||||
|
||||
echo "Installation finished!"
|
||||
|
||||
reboot now
|
||||
|
Reference in New Issue
Block a user