check ip update
This commit is contained in:
parent
29fa093507
commit
26e404e441
17
README.md
17
README.md
@ -1,9 +1,14 @@
|
||||
# scripts
|
||||
|
||||
### Bash scripts for setting things up
|
||||
### Scripts for setting things up
|
||||
|
||||
- `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
|
||||
- `macos-first-install.sh` installs basic soft i need on clean machine
|
||||
#### 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
|
||||
|
||||
- `svg-parse.py` parses the svg russia map and outputs titles of the regions and their ids
|
||||
@ -1,12 +1,12 @@
|
||||
#!/bin/bash
|
||||
|
||||
URL="gitea.vlnko.com"
|
||||
IPADDR="31.210.220.6"
|
||||
read -p "URL для проверки: " url
|
||||
read -p "IP для проверки: " ipaddr
|
||||
|
||||
while true; do
|
||||
timestamp=$(date +"%H:%M:%S")
|
||||
|
||||
result=$(nslookup $URL | grep $IPADDR)
|
||||
result=$(nslookup $url | grep $ipaddr)
|
||||
|
||||
if [ -n "$result" ]; then
|
||||
echo "✔️ Запись обновилась."
|
||||
@ -14,6 +14,6 @@ while true; do
|
||||
exit 0
|
||||
fi
|
||||
|
||||
printf "\r🔃Проверил $IPADDR в $timestamp: Запись еще не обновилась."
|
||||
printf "\r🔃Проверил $ipaddr в $timestamp: Запись еще не обновилась."
|
||||
sleep 60
|
||||
done
|
||||
|
||||
@ -1,24 +1,20 @@
|
||||
#!/bin/bash
|
||||
|
||||
|
||||
# Installing homebrew
|
||||
|
||||
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
|
||||
echo "✅ Homebrew installed"
|
||||
|
||||
|
||||
# Installing z
|
||||
|
||||
brew install z
|
||||
echo "✅ Z installed"
|
||||
|
||||
|
||||
# Installing ohmyzsh
|
||||
|
||||
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
|
||||
|
||||
# Writing .zshrc file
|
||||
cat <<EOF > ~/.zshrc
|
||||
# Basics
|
||||
export ZSH="$HOME/.oh-my-zsh"
|
||||
@ -33,13 +29,9 @@ alias dea=". env/bin/activate"
|
||||
EOF
|
||||
echo "✅ Ohmyzsh installed, .zshrc created, zsh-autosuggestions installed"
|
||||
|
||||
|
||||
# Installing neovim and config
|
||||
|
||||
brew install neovim
|
||||
|
||||
mkdir -p ~/.config/nvim
|
||||
|
||||
cat <<EOF > ~/.config/nvim/init.lua
|
||||
vim.cmd("set expandtab")
|
||||
vim.cmd("set tabstop=2")
|
||||
@ -53,7 +45,6 @@ echo "✅ Neovim installed, config written (~/.config/nvim/init.lua)"
|
||||
|
||||
|
||||
# Installing obsidian, figma, firefox
|
||||
|
||||
brew install --cask obsidian
|
||||
echo "✅ Obsidian installed"
|
||||
brew install --cask figma
|
||||
|
||||
Loading…
Reference in New Issue
Block a user