سلام
یه اسکریپت نوشتم که خودش آرچ را کانفیگ کنه مثلا درایور تاچ پد لپتاپ یا .. را نصب کنه, یه Display manager کانفیگ کنه با انتخاب کاربر میزکار یا سرویس تور را نصب کنه و ...
سورس اسکریپت:
#!/bin/bash
#===============================================================================
#
# Script name: ArchConf
#
# Writter's full name: Hossein Heydari
#
# Contact: hossein7heydari@gmail.com
#
# Hossein on Twitter: @hossein7heydari
#
# Description: This script will config your Arch Linux
#
#===============================================================================
div=============================================================================
echo $div
sleep 2
echo "Welcome to ArchConf Script"
sleep 2
echo "This Script will configure you Arch Linux!"
sleep 2
echo "This operation may takes some time depends on your Internet Speed!"
sleep 2
echo $div
sleep 1
function XFCE {
clear
echo $div
sleep 1
echo "We are going to install XFCE!"
sleep
sudo pacman -S xfce4 xfce4-goodies
sleep 1
}
function Openbox {
clear
echo $div
echo "We are going to install Openbox!"
sleep 2
sudo pacman -S openbox obconf tint2
sleep 1
}
function Cinnamon {
clear
echo $div
echo "We are going to install Cinnamon!"
sleep 2
sudo pacman -S cinnamon nemo-fileroller cinnamon-power-applet
sleep 1
}
function Mate {
clear
echo $div
echo "We are going to install Mate!"
sleep 2
sudo pacman -S mate mate-extra
sleep 1
}
lightDM () {
clear
echo "We are going to configure LightDM"
sleep 2
echo "These Packages are needed for LightDM"
sleep 5
sudo pacman -S lightdm lightdm-gtk-greeter lightdm-gtk-greeter-settings
clear
sleep 1
sudo systemctl enable lightdm -f
}
option () {
clear
sleep 1
echo $div
echo "We are installing some usefull packages!"
sleep 2
sudo pacman -S firefox vlc xf86-input-synaptics gedit
sleep 2
}
TOR () {
clear
sudo pacman -S tor torsocks obfsproxy
clear
sleep 1
echo "Torrc is going to be configured!"
echo "UseBridges 1" >> /etc/tor/torrc
echo "Bridge obfs3 52.16.234.166:35536" >> /etc/tor/torrc
echo "ClientTransportPlugin obfs3 exec /usr/bin/obfsproxy --managed" >> /etc/tor/torrc
echo "CircuitBuildTimeout 4" >> /etc/tor/torrc
echo "KeepalivePeriod 70" >> /etc/tor/torrc
echo "NewCircuitPeriod 25" >> /etc/tor/torrc
echo "NumEntryGuards 6" >> /etc/tor/torrc
sudo systemctl start tor.service
sudo systemctl enable tor.service
}
clear
#Packages for wifi
echo $div
sleep 1
echo "These Packages are needed for wireless!"
sleep 3
sudo pacman -S dialog wpa_actiond ifplugd wpa_supplicant
echo $div
sleep 1
clear
#Packages X server
echo $div
sleep 1
echo "These Packages are needed for X server!"
sleep 3
sudo pacman -S xorg xorg-xinit
echo $div
sleep 1
clear
#Packages for sound
echo $div
sleep 1
echo "These Packages are needed for sound!"
sleep 3
sudo pacman -S alsa-firmware alsa-utils alsa-plugins pulseaudio-alsa pulseaudio
echo $div
sleep 1
clear
#Network configuration
clear
echo $div
sleep 1
echo "I am configuring your Network :-)"
sleep 2
ethernet="$(ip link | awk -vFS=': ' '/^2/ {print $2}')"
sudo systemctl enable dhcpcd
sleep 1
sudo systemctl enable dhcpcd@$ethernet
wireless="$(ip link | awk -vFS=': ' '/^3/ {print $2}')"
sudo systemctl enable dhcpcd@$wireless
#Desktop configuration
while [ true ]; do
clear
read -p "Which desktop do you like? (XFCE/Cinnamon/Openbox/Mate/else)" desktop
case $desktop in
XFCE)
XFCE
break
;;
Cinnamon)
Cinnamon
break
;;
Openbox)
Openbox
break
;;
Mate)
Mate
break
;;
else)
echo "So you should Install Desktop yourself!"
break
;;
*)
echo "Please choose one of the choices!"
;;
esac
done
#Packages for lightdm
clear
echo $div
sleep 1
while [ true ]; do
clear
read -p "Do you want to install lightDM as Display Manager? (Y/N)" de
if [ "$de" == "Y" ]; then
echo "Okay!"
lightDM
break
elif [ "$de" == "N" ]; then
echo "So don't forget that you should config Display Manager by yourself!"
sleep 2
break
else
echo "Try again!"
sleep 1
echo "You have only have wo choices Y or N"
fi
done
echo $div
sleep 1
#Tor for being anonymouse in Internet
clear
echo $div
sleep 1
while [ true ]; do
clear
read -p "Do you want to install and configure TOR for being anonymouse in internet? (Y/N)" tor
if [ "$tor" == "Y" ]; then
echo "Okay!"
TOR
break
elif [ "$tor" == "N" ]; then
echo "Okay!"
break
else
echo "Try again!"
echo "you only have two choices Y or N"
sleep 2
fi
done
echo $div
sleep 1
while [ true ]; do
clear
read -p "Do you want to install some optional Packages such as touchpad driver,firefox and ETC?! (Y/N)" option
if [ "$option" == "Y" ]; then
option
break
elif [ "$option" == "N" ]; then
echo "Okay!"
break
else
echo "You should choose Y or N"
fi
done
echo $div
echo "It's Over!"
sleep 2
echo "Now you should reboot your system"
sleep 2
echo "Bye Bye"
sleep 2
echo $div
sleep 2
این اسکریپت فعلا نسخهی تست هست! الان فقط منتظر نظرات یا مشکلاتش هستم