feat: better user scripts
This commit is contained in:
parent
279fc2bbb7
commit
dd8b85c962
3
.gitmodules
vendored
3
.gitmodules
vendored
@ -1,6 +1,3 @@
|
|||||||
[submodule ".vim/pack/dist/opt/nerdtree"]
|
|
||||||
path = .vim/pack/dist/opt/nerdtree
|
|
||||||
url = https://github.com/preservim/nerdtree.git
|
|
||||||
[submodule ".vim/pack/dist/opt/vim-better-whitespace"]
|
[submodule ".vim/pack/dist/opt/vim-better-whitespace"]
|
||||||
path = .vim/pack/dist/opt/vim-better-whitespace
|
path = .vim/pack/dist/opt/vim-better-whitespace
|
||||||
url = https://github.com/ntpeters/vim-better-whitespace.git
|
url = https://github.com/ntpeters/vim-better-whitespace.git
|
||||||
|
1
.vim/pack/dist/opt/nerdtree
vendored
1
.vim/pack/dist/opt/nerdtree
vendored
@ -1 +0,0 @@
|
|||||||
Subproject commit e731b845590017493224dfcb7403c2332105b700
|
|
@ -1,18 +1,16 @@
|
|||||||
#!/usr/bin/bash
|
#!/usr/bin/bash
|
||||||
|
|
||||||
if [ "$EUID" != '0' ]; then
|
set -e
|
||||||
echo 'error: you cannot perform this operation unless you are root.'
|
|
||||||
|
if [ "$EUID" == 0 ]; then
|
||||||
|
echo 'error: cannot be root.'
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
systemctl start libvirtd
|
sudo systemctl start libvirtd
|
||||||
virsh net-start default
|
sudo virsh net-start default
|
||||||
|
|
||||||
if [ -n "$SUDO_USER" ]; then
|
|
||||||
su "$SUDO_USER" -c 'virt-manager --no-fork'
|
|
||||||
else
|
|
||||||
virt-manager --no-fork
|
virt-manager --no-fork
|
||||||
fi
|
|
||||||
|
|
||||||
virsh net-destroy default
|
sudo virsh net-destroy default
|
||||||
systemctl stop libvirtd
|
sudo systemctl stop libvirtd
|
||||||
|
Loading…
Reference in New Issue
Block a user