first commit

This commit is contained in:
2026-01-12 01:03:54 +04:00
commit b5c4a90c6a
2 changed files with 101 additions and 0 deletions

22
service/nginx/ins_repo-nginx.sh Executable file
View File

@@ -0,0 +1,22 @@
#!/usr/bin/env bash
function system_update() {
apt update
apt install curl gnupg2 ca-certificates lsb-release ubuntu-keyring -y
}
function add_reponginx() {
curl https://nginx.org/keys/nginx_signing.key | gpg --dearmor \
| sudo tee /usr/share/keyrings/nginx-archive-keyring.gpg >/dev/null
gpg --dry-run --quiet --no-keyring --import --import-options import-show /usr/share/keyrings/nginx-archive-keyring.gpg
echo "deb [signed-by=/usr/share/keyrings/nginx-archive-keyring.gpg] https://nginx.org/packages/ubuntu `lsb_release -cs` nginx" \
| sudo tee /etc/apt/sources.list.d/nginx.list
echo -e "Package: *\nPin: origin nginx.org\nPin: release o=nginx\nPin-Priority: 900\n" \
| sudo tee /etc/apt/preferences.d/99nginx
apt update
}
system_update
add_reponginx