check ip update

This commit is contained in:
vlnko 2026-01-03 15:47:32 +03:00
parent 29fa093507
commit 26e404e441
3 changed files with 17 additions and 21 deletions

View File

@ -1,9 +1,14 @@
# scripts # scripts
### Bash scripts for setting things up ### Scripts for setting things up
#### Bash
- `nvim-install.sh` Installs neovim and creates config
- `alacritty-install.sh` Installs alacritty, creates config and installs catpuccin frappe theme
- `check-ip.sh` Checks if the public IP address linked to the domain name
- `macos-first-install.sh` Installs basic soft I need on a clean machine
#### Python
- `nvim-install.sh` installs nvim and creates my config file for it
- `alacritty-install.sh` installs alacritty, creates my config file and installs catpuccin frappe theme
- `check-ip.sh` checks the public IP address linked to the domain name
- `svg-parse.py` parses the svg russia map and outputs titles of the regions and their ids - `svg-parse.py` parses the svg russia map and outputs titles of the regions and their ids
- `macos-first-install.sh` installs basic soft i need on clean machine

View File

@ -1,12 +1,12 @@
#!/bin/bash #!/bin/bash
URL="gitea.vlnko.com" read -p "URL для проверки: " url
IPADDR="31.210.220.6" read -p "IP для проверки: " ipaddr
while true; do while true; do
timestamp=$(date +"%H:%M:%S") timestamp=$(date +"%H:%M:%S")
result=$(nslookup $URL | grep $IPADDR) result=$(nslookup $url | grep $ipaddr)
if [ -n "$result" ]; then if [ -n "$result" ]; then
echo "✔️ Запись обновилась." echo "✔️ Запись обновилась."
@ -14,6 +14,6 @@ while true; do
exit 0 exit 0
fi fi
printf "\r🔃Проверил $IPADDR в $timestamp: Запись еще не обновилась." printf "\r🔃Проверил $ipaddr в $timestamp: Запись еще не обновилась."
sleep 60 sleep 60
done done

View File

@ -1,24 +1,20 @@
#!/bin/bash #!/bin/bash
# Installing homebrew # Installing homebrew
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
echo "✅ Homebrew installed" echo "✅ Homebrew installed"
# Installing z # Installing z
brew install z brew install z
echo "✅ Z installed" echo "✅ Z installed"
# Installing ohmyzsh # Installing ohmyzsh
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
# Installing zsh-autosuggestions plugin
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
# Writing .zshrc file
cat <<EOF > ~/.zshrc cat <<EOF > ~/.zshrc
# Basics # Basics
export ZSH="$HOME/.oh-my-zsh" export ZSH="$HOME/.oh-my-zsh"
@ -33,13 +29,9 @@ alias dea=". env/bin/activate"
EOF EOF
echo "✅ Ohmyzsh installed, .zshrc created, zsh-autosuggestions installed" echo "✅ Ohmyzsh installed, .zshrc created, zsh-autosuggestions installed"
# Installing neovim and config # Installing neovim and config
brew install neovim brew install neovim
mkdir -p ~/.config/nvim mkdir -p ~/.config/nvim
cat <<EOF > ~/.config/nvim/init.lua cat <<EOF > ~/.config/nvim/init.lua
vim.cmd("set expandtab") vim.cmd("set expandtab")
vim.cmd("set tabstop=2") vim.cmd("set tabstop=2")
@ -53,7 +45,6 @@ echo "✅ Neovim installed, config written (~/.config/nvim/init.lua)"
# Installing obsidian, figma, firefox # Installing obsidian, figma, firefox
brew install --cask obsidian brew install --cask obsidian
echo "✅ Obsidian installed" echo "✅ Obsidian installed"
brew install --cask figma brew install --cask figma