-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstart_kali.sh
38 lines (30 loc) · 1.29 KB
/
start_kali.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/bin/bash
set -e
# Bu script, Kali Linux'ta 'intconsole' komutu için bir alias oluşturur ve .bashrc dosyasına ekler.
# Scriptin çalıştırılabilir olması için izinleri ayarla
chmod +x start_kali.sh
# İlk çalıştırma için bir kontrol dosyası oluşturun.
if [ ! -f "$HOME/intframework/.install_done" ]; then
python3 "$HOME/intframework/installintconsole.py"
touch "$HOME/intframework/.install_done"
echo "Kurulum tamamlandı."
fi
# intconsole dosyasını uygun dizine taşıyın
if [ -f "$HOME/intframework/intconsole" ]; then
mv "$HOME/intframework/intconsole" "$PREFIX/bin/"
echo "'intconsole' dosyası $PREFIX/bin/ dizinine taşındı."
else
echo "Hata: 'intconsole' dosyası bulunamadı."
exit 1
fi
# 'intconsole' komutunu tanımlayın. Eğer daha önce eklenmemişse.
if ! grep -q "alias intconsole" "$HOME/.bashrc"; then
echo "alias intconsole='cd ~/intframework && python3 intconsoleV4.py && cd -'" >> "$HOME/.bashrc"
echo "'intconsole' komutu başarıyla .bashrc dosyanıza eklendi."
else
echo "'intconsole' komutu zaten mevcut."
fi
# .bashrc dosyasını yeniden yükleyin.
source "$HOME/.bashrc"
# Kullanıcıya scriptin başarıyla eklendiğini bildirin.
echo "Kali Linux'ta 'intconsole' komutu .bashrc dosyanıza başarıyla eklendi ve hazır."