install a firewall frontend if not available
This commit is contained in:
parent
82cf1547fa
commit
1999df1350
12
install.sh
12
install.sh
@ -17,17 +17,20 @@ if [[ -f /etc/os-release ]]; then
|
|||||||
echo "Running on debian-family.."
|
echo "Running on debian-family.."
|
||||||
package_manager=apt
|
package_manager=apt
|
||||||
vim="vim-nox"
|
vim="vim-nox"
|
||||||
|
firewall="ufw"
|
||||||
;;
|
;;
|
||||||
fedora)
|
fedora)
|
||||||
echo "Running on rpm-family.."
|
echo "Running on rpm-family.."
|
||||||
package_manager=dnf
|
package_manager=dnf
|
||||||
vim="vim-enhanced"
|
vim="vim-enhanced"
|
||||||
ansible="ansible-core"
|
ansible="ansible-core"
|
||||||
|
firewall="" #firewall & firewall-cmd installed by default on rpm OSes
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
echo "Running on best-guess"
|
echo "Running on best-guess"
|
||||||
package_manager=apt
|
package_manager=apt
|
||||||
vim="vim-nox"
|
vim="vim-nox"
|
||||||
|
firewall="ufw"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
else
|
else
|
||||||
@ -40,7 +43,11 @@ fi
|
|||||||
if [[ -z "$1" ]]; then
|
if [[ -z "$1" ]]; then
|
||||||
echo "Installing packages"
|
echo "Installing packages"
|
||||||
sudo "$package_manager" install -y "$vim" git stow curl ranger tmux \
|
sudo "$package_manager" install -y "$vim" git stow curl ranger tmux \
|
||||||
qemu-guest-agent
|
qemu-guest-agent $firewall
|
||||||
|
|
||||||
|
# firewall rules
|
||||||
|
sudo $firewall allow ssh
|
||||||
|
|
||||||
# install vim-plug
|
# install vim-plug
|
||||||
curl -fLo ~/.vim/autoload/plug.vim --create-dirs \
|
curl -fLo ~/.vim/autoload/plug.vim --create-dirs \
|
||||||
https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
|
https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
|
||||||
@ -48,8 +55,11 @@ if [[ -z "$1" ]]; then
|
|||||||
# backup current configs
|
# backup current configs
|
||||||
[[ -f ~/.bashrc ]] && mv ~/.bashrc ~/.bashrc.bak || echo "bashrc ~exists"
|
[[ -f ~/.bashrc ]] && mv ~/.bashrc ~/.bashrc.bak || echo "bashrc ~exists"
|
||||||
[[ -f ~/.bash_profile ]] && mv ~/.bash_profile ~/.bash_profile.bak || echo ".bash_profile ~exists"
|
[[ -f ~/.bash_profile ]] && mv ~/.bash_profile ~/.bash_profile.bak || echo ".bash_profile ~exists"
|
||||||
|
|
||||||
# use gnu stow to symlink config files to home directory
|
# use gnu stow to symlink config files to home directory
|
||||||
stow bash ranger shellenv tmux vim
|
stow bash ranger shellenv tmux vim
|
||||||
|
|
||||||
|
# install everything via plug "the vim package manager"
|
||||||
vim +PlugInstall +qall
|
vim +PlugInstall +qall
|
||||||
elif [[ undo = "$1" ]]; then
|
elif [[ undo = "$1" ]]; then
|
||||||
echo "undoing"
|
echo "undoing"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user