Skip to content

Commit 725c02c

Browse files
jash90claude
andcommitted
Sync main 1:1 with unkn0w/noobs upstream
- Update all scripts to upstream versions - Add scripts/chce_tailscale.sh (missing in fork) - Remove docs/ and lib/ (fork-only additions, present on add-scripts branch) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent d630344 commit 725c02c

57 files changed

Lines changed: 1386 additions & 3755 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

actions/chce_aliasy.sh

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
11
#!/bin/bash
22

3-
# Zaladuj biblioteke noobs
4-
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
5-
source "${SCRIPT_DIR}/../lib/noobs_lib.sh" || exit 1
6-
73
if [[ -n "$(grep 'policz' ~/.bash_aliases)" ]]; then
8-
msg_info "Już dodano aliasy z tego pliku"
4+
echo "Już dodano aliasy z tego pliku"
95
exit 0
106
fi
117

@@ -48,5 +44,5 @@ alias jsonf="python -m json.tool"
4844
alias losuj="python -c '\''from os import urandom; from base64 import b64encode; print(b64encode(urandom(32)).decode(\"utf-8\"))'\''"
4945
' >>~/.bash_aliases
5046

51-
msg_ok "Pomyślnie dodano aliasy!"
52-
msg_info "Upewnij się, że plik ~/.bash_aliases jest ładowany przy tworzeniu nowego basha."
47+
echo "Pomyślnie dodano aliasy!"
48+
echo "Upewnij się, że plik ~/.bash_aliases jest ładowany przy tworzeniu nowego basha."

actions/chce_git_status_PS1.sh

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,7 @@
22
# Dodanie do aktualnego $PS1 statusu repozytorium gita bieżącego katalogu
33
# Autorzy: Tomasz Wiśniewski, krystofair @ 2025-09-22
44

5-
# Zaladuj biblioteke noobs
6-
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
7-
source "${SCRIPT_DIR}/../lib/noobs_lib.sh" || exit 1
8-
9-
msg_info "Jeśli twoja wybrana powłoka nie zadziała, to spróbuj zainstalować do 'bash'."
5+
echo "Jeśli twoja wybrana powłoka nie zadziała, to spróbuj zainstalować do 'bash'."
106
sleep 1
117

128
if ! shopt -oq posix; then
@@ -154,14 +150,14 @@ if [[ ! $? -eq 0 ]]; then echo $ch_shell; exit -1; fi
154150

155151
installation_type=$(choose_installation_place)
156152
install_path=$(get_install_path_for_specific_shell $ch_shell $installation_type)
157-
if [[ ! $? -eq 0 ]]; then msg_error "Coś poszło nie tak."; exit -1; fi
153+
if [[ ! $? -eq 0 ]]; then echo "Coś poszło nie tak."; exit -1; fi
158154

159155

160156
if [[ ! -e $GIT_PROMPT_FILE ]]
161157
then
162158
# https://anotheruiguy.gitbooks.io/gitforeveryone/content/auto/README.html
163159
GIT_PROMPT_FILE_URL="https://raw.githubusercontent.com/git/git/master/contrib/completion/git-prompt.sh"
164-
msg_info "Pobieram plik $GIT_PROMPT_FILE_URL"
160+
echo "Pobieram plik $GIT_PROMPT_FILE_URL"
165161
curl -o $GIT_PROMPT_FILE "$GIT_PROMPT_FILE_URL"
166162
fi
167163

@@ -178,12 +174,12 @@ fi
178174
# W tym miejscu nie ma sprawdzenia czy plik już istnieje,
179175
# ze względu na to, że jeżeli użytkownik namiesza w oryginalnym pliku,
180176
# to uruchomienie skryptu po raz drugi naprawi mu ten plik.
181-
msg_info "Instaluję plik $FILENAME w katalogu $(dirname $install_path)"
177+
echo "Instaluję plik $FILENAME w katalogu $(dirname $install_path)"
182178
install -m 0644 $GIT_PROMPT_FILE $(dirname $install_path)/$FILENAME
183179

184180
if test -e $install_path && test -n "$(cat $install_path | grep __git_ps1)"
185181
then
186-
msg_info "Masz to już zainstalowane."
182+
echo "Masz to już zainstalowane."
187183
unset ch_shell
188184
unset installation_type
189185
unset install_path
@@ -240,13 +236,13 @@ if test $ch_shell = bash || test $ch_shell = csh
240236
then
241237
new_ps1=$(choose_ps1_format)
242238
if [[ ! $? -eq 0 ]]; then
243-
msg_error "Wybrano zły format, nie robię nic, kończę."
244-
msg_info "Uruchom mnie ponownie."
239+
echo "Wybrano zły format, nie robię nic, kończę."
240+
echo "Uruchom mnie ponownie."
245241
exit 0
246242
fi
247243
fi
248244

249-
msg_info "Dodaję nowe instrukcje do pliku $install_path"
245+
echo "Dodaję nowe instrukcje do pliku $install_path"
250246
echo "# === Dodane przez skrypt 'chce_git_status_PS1.sh'. ===" >> $install_path
251247
echo "$features" >> $install_path
252248
echo 'if [[ -z $(declare -F | grep __git_ps1) ]]; then' >> $install_path
@@ -274,3 +270,4 @@ unset FILENAME
274270
rm -f $GIT_PROMPT_FILE
275271

276272
exit 0
273+

actions/chce_lepszego_vima.sh

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
11
#!/bin/bash
22

3-
# Zaladuj biblioteke noobs
4-
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
5-
source "${SCRIPT_DIR}/../lib/noobs_lib.sh" || exit 1
6-
73
if [[ -n "$(grep 'map <silent> <F5> :!python3 %<CR>' ~/.vimrc)" ]]; then
8-
msg_info "Już zaktualizowano Twoją konfigurację vima"
4+
echo "Już zaktualizowano Twoją konfigurację vima"
95
exit 0
106
fi
117

@@ -23,4 +19,4 @@ set tabstop=4
2319
set shiftwidth=4
2420
set expandtab' >>~/.vimrc
2521

26-
msg_ok "Dodano pomyślnie"
22+
echo "Dodano pomyślnie"

actions/chce_moje_klucze_ssh.sh

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,36 +5,32 @@
55

66
# Skrypt pobiera klucze podanego użytkownika z GitHub i dodaje je do zaufanych
77

8-
# Zaladuj biblioteke noobs
9-
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
10-
source "${SCRIPT_DIR}/../lib/noobs_lib.sh" || exit 1
11-
128
if [[ ! "$1" =~ [a-z]{4,38} ]]; then
13-
msg_error "Jako paramert skryptu podaj nazwę użytkownika GitHub"
14-
msg_error "Na przykład $0 koliwbr pobiera klucze użytkownika koliwbr."
15-
msg_error "Koniecznie zamień na własną nazwę użytkownika!"
9+
echo -e "\033[5;31m[!]\033[0m\033[1;31m Jako paramert skryptu podaj nazwę użytkownika GitHub\033[0m"
10+
echo -e "\033[5;31m[!]\033[0m Na przykład \033[0;32m$0 koliwbr\033[0m pobiera klucze użytkownika koliwbr."
11+
echo -e "\033[5;31m[!]\033[0m Koniecznie zamień na własną nazwę użytkownika!"
1612
exit 1
1713
fi
1814

1915
TMPFILENAME=`mktemp`
2016

2117
if curl "https://github.com/$1.keys" -sf > $TMPFILENAME; then echo -n; else
22-
msg_error "Nie znaleziono użytkownika $1 na GitHub"
18+
echo -e "\033[5;31m[!]\033[0m Nie znaleziono użytkownika $1 na GitHub"
2319
rm $TMPFILENAME
2420
exit 2
2521

2622
fi
2723

2824
if [[ ! -s $TMPFILENAME ]]; then
29-
msg_error "Znaleziono użytkownika $1 na GitHub ale nie masz żadnich kluczy SSH"
30-
msg_error "Poniżej informacja jak je dodać do konta GitHub"
31-
msg_error "https://docs.github.com/en/authentication/connecting-to-github-with-ssh/adding-a-new-ssh-key-to-your-github-account#prerequisites"
25+
echo -e "\033[5;31m[!]\033[0m Znaleziono użytkownika $1 na GitHub ale nie masz żadnich kluczy SSH"
26+
echo -e "\033[5;31m[!]\033[0m Poniżej informacja jak je dodać do konta GitHub"
27+
echo -e "\033[5;31m[!]\033[0m \033[4mhttps://docs.github.com/en/authentication/connecting-to-github-with-ssh/adding-a-new-ssh-key-to-your-github-account#prerequisites\033[0m"
3228
rm $TMPFILENAME
3329
exit 3
3430

3531
fi
3632

3733
mkdir $HOME/.ssh -p
3834
cat $TMPFILENAME >> $HOME/.ssh/authorized_keys
39-
msg_ok "Dodano `cat $TMPFILENAME | wc -l` klucz/e/y! Teraz możesz się logować swoimi kluczem/ami z GitHub!"
40-
rm $TMPFILENAME
35+
echo Dodano `cat $TMPFILENAME | wc -l` klucz/e/y! Teraz możesz się logować swoimi kluczem/ami z GitHub!
36+
rm $TMPFILENAME

actions/chce_narzedzia.sh

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,6 @@
22
# Instalacja przydatnych programow
33
# Autor: Maciej Loper
44

5-
# Zaladuj biblioteke noobs
6-
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
7-
source "${SCRIPT_DIR}/../lib/noobs_lib.sh" || exit 1
8-
95
PKG1="vim tree multitail"
106
PKG2="unattended-upgrades ncdu silversearcher-ag"
117
PKG3="ansible ranger logwatch python3-pip fish nmon"
@@ -26,22 +22,27 @@ usage() {
2622
# zainstaluj paczke nr X
2723
install_pX() {
2824
pkg="PKG${1}"
29-
pkg_install ${!pkg}
25+
sudo apt install -y ${!pkg}
26+
}
27+
28+
# aktualizuj repozytoria
29+
update_repo() {
30+
sudo apt update
3031
}
3132

3233
[ "$#" -lt 1 ] && usage
3334

3435
# sprawdz uprawnienia sudo
35-
require_sudo
36+
sudo -l &>/dev/null || { echo "Nie masz uprawnien do uruchamiania komend jako root - dodaj '$USER' do grupy 'sudoers'."; }
3637

3738
refreshed=false
3839

3940
for arg in "$@"; do
4041
# sprawdz parametr
4142
echo "$AVAILABLE" | grep -q "$arg" || { usage; }
4243
# aktualizuj tylko raz
43-
$refreshed || pkg_update
44+
$refreshed || update_repo
4445
# zainstaluj paczke nr X
4546
install_pX "$arg"
4647
echo
47-
done
48+
done

actions/chce_ssh_config.sh

Lines changed: 10 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,6 @@
77
# --port PORT_NUMBER (to configure connection for non mikr.us host)
88
# --host HOSTNAME (to configure connection for non mikr.us host)
99
# username@test.com (without param in front)
10-
11-
# Zaladuj biblioteke noobs
12-
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
13-
source "${SCRIPT_DIR}/../lib/noobs_lib.sh" || exit 1
14-
1510
# some bash magic: https://brianchildress.co/named-parameters-in-bash/
1611
while [ $# -gt 0 ]; do
1712
if [[ $1 == *"--"* ]]; then
@@ -27,12 +22,12 @@ while [ $# -gt 0 ]; do
2722
done
2823

2924
if [[ -n "$mikrus" && -n "$possible_ssh_param" ]]; then
30-
msg_error "--mikrus and ssh-like argument ($possible_ssh_param) were given in the same time!"
25+
echo "ERROR: --mikrus and ssh-like argument ($possible_ssh_param) were given in the same time!"
3126
exit 1
3227
fi
3328

3429
if [[ -n "$host" && -n "$possible_ssh_param" ]]; then
35-
msg_error "--host and ssh-like argument ($possible_ssh_param) were given in the same time!"
30+
echo "ERROR: --host and ssh-like argument ($possible_ssh_param) were given in the same time!"
3631
exit 2
3732
fi
3833

@@ -41,13 +36,13 @@ user="${user:-root}"
4136

4237
if [ -n "$mikrus" ]; then
4338
if ! [[ "$mikrus" =~ ^[a-z]+[0-9]+$ ]]; then
44-
msg_error "--mikrus parameter is not valid!"
39+
echo "ERROR: --mikrus parameter is not valid!"
4540
exit 3
4641
fi
4742

4843
number_part=$(echo "$mikrus" | grep -o '[0-9]\+')
4944
if [ -z "$number_part" ]; then
50-
msg_error "Could not extract number from mikrus name!"
45+
echo "ERROR: Could not extract number from mikrus name!"
5146
exit 4
5247
fi
5348

@@ -61,7 +56,7 @@ if [ -n "$possible_ssh_param" ]; then
6156
fi
6257

6358
if [ -z "$host" ]; then
64-
msg_error "Host was not recognized by any known method (--mikrus or --host or by specifying user@host.com)."
59+
echo "ERROR: Host was not recognized by any known method (--mikrus or --host or by specifying user@host.com)."
6560
echo ""
6661
echo "Usage: you can pass following arguments:"
6762
echo " --mikrus MIKRUS_NAME (i.e. 'X123')"
@@ -72,11 +67,11 @@ if [ -z "$host" ]; then
7267
exit 5
7368
fi
7469

75-
msg_info "Following params will be used to generate ssh config: user:'$user', host:'$host', port:'$port'"
70+
echo "Following params will be used to generate ssh config: user:'$user', host:'$host', port:'$port'"
7671
read -n 1 -s -p "Press enter (or space) to continue or any other key to cancel." decision
7772
echo ""
7873
if [ -n "$decision" ]; then
79-
msg_info "No further changes."
74+
echo "No further changes."
8075
exit 0
8176
fi
8277

@@ -99,12 +94,12 @@ if ! grep -q "$header" ~/.ssh/config ; then
9994
echo " Port $port" >> ~/.ssh/config
10095
echo " IdentityFile $ssh_key_file" >> ~/.ssh/config
10196
else
102-
msg_error "'$header' already defined in ~/.ssh/config!"
97+
echo "ERROR: '$header' already defined in ~/.ssh/config!"
10398
exit 6
10499
fi
105100

106101
ssh-copy-id -i "$ssh_key_file" $header
107102

108103
echo ""
109-
msg_ok "ssh was properly configured!"
110-
msg_info "Remember, that you can use tab to use autofill to type connection string faster - type few first chars of Host (i.e. 'ssh ${header:0:8}', or even less), then press tab."
104+
echo "ssh was properly configured!"
105+
echo "Remember, that you can use tab to use autofill to type connection string faster - type few first chars of Host (i.e. 'ssh ${header:0:8}', or even less), then press tab."

actions/chce_usera.sh

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
# Tworzenie nowego uzytkownika, z dostepem do sudo i kopia authorized_keys
33

44
# Autor: Radoslaw Karasinski, Grzegorz Ćwikliński, Szymon Hryszko, Artur Stefański
55

6-
# Zaladuj biblioteke noobs
7-
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
8-
source "${SCRIPT_DIR}/../lib/noobs_lib.sh" || exit 1
6+
# if no sudo, then exit
7+
if [ "$(id -u)" != "0" ]; then
8+
echo "Musisz uruchomić ten skrypt jako root" 1>&2
9+
echo "Spróbuj sudo $0"
10+
exit 1
911

10-
require_root
12+
fi
1113

1214
_check_if_user_exits() {
1315
given_user=$1
@@ -95,4 +97,4 @@ if [ -d /opt/noobs ]; then
9597
sudo chown -R $username:$username /home/$username/noobs
9698
fi
9799

98-
msg_ok "Pomyślnie stworzono użytkownia ${username}."
100+
echo "Pomyślnie stworzono użytkownia ${username}."

default-tools/n8n_install

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ EOF
8787
docker rm -f n8n >/dev/null 2>&1
8888
docker rm -f watchtower_n8n >/dev/null 2>&1
8989
docker pull n8nio/n8n:latest
90-
docker pull containrrr/watchtower
90+
docker pull nickfedor/watchtower
9191

9292
docker run -itd \
9393
--memory=$[$availableMemory-100]m \
@@ -116,7 +116,7 @@ docker run -d \
116116
--restart unless-stopped \
117117
-e WATCHTOWER_POLL_INTERVAL=259200 \
118118
-v /var/run/docker.sock:/var/run/docker.sock \
119-
containrrr/watchtower \
119+
nickfedor/watchtower \
120120
n8n --cleanup
121121

122122
echo -n -e " ${GREEN}> Startowanie aplikacji...${NORMAL}"

default-tools/n8n_install_postgres

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ docker rm -f watchtower_n8n >/dev/null 2>&1
9696
docker pull n8nio/n8n:latest
9797
#docker pull postgres:13
9898
docker pull pgvector/pgvector:pg15
99-
docker pull containrrr/watchtower
99+
docker pull nickfedor/watchtower
100100

101101
#uruchamiamy DB
102102
docker run -itd \
@@ -149,7 +149,7 @@ docker run -d \
149149
--restart unless-stopped \
150150
-e WATCHTOWER_POLL_INTERVAL=259200 \
151151
-v /var/run/docker.sock:/var/run/docker.sock \
152-
containrrr/watchtower \
152+
nickfedor/watchtower \
153153
n8n --cleanup
154154

155155
echo -n -e " ${GREEN}> Startowanie aplikacji...${NORMAL}"

0 commit comments

Comments
 (0)