Server root config

This commit is contained in:
2019-08-20 15:06:24 +00:00
parent 5a2794b643
commit 92aa2bd6f5
8 changed files with 37 additions and 12 deletions

View File

@@ -9,7 +9,6 @@ commit-msg.txt
scripts/* scripts/*
!scripts/sync-shortcuts !scripts/sync-shortcuts
txt/ txt/
.gitconfig
.imwheelrc .imwheelrc
.xinitrc .xinitrc
.Xresources .Xresources

View File

@@ -52,13 +52,14 @@ mkpk "makepkg -sri"
ex "chmod +x" ex "chmod +x"
# systemctl [[[ # # systemctl [[[ #
ctl "sudo systemctl" ct "sudo systemctl"
ctle "sudo systemctl enable" cte "sudo systemctl enable"
ctld "sudo systemctl disable" ctd "sudo systemctl daemon-reload"
ctla "sudo systemctl start" ctdi "sudo systemctl disable"
ctls "sudo systemctl stop" cta "sudo systemctl start"
ctlt "sudo systemctl status" cts "sudo systemctl stop"
ctlr "sudo systemctl restart" ctt "sudo systemctl status"
# ctr "sudo systemctl restart"
ctltd "sudo systemctl status dhcpcd" ctltd "sudo systemctl status dhcpcd"
ctlas "sudo systemctl start sshd" ctlas "sudo systemctl start sshd"
@@ -210,9 +211,11 @@ xpk "pkg list-installed | awk -F/ '{print \$1}' > ~/{{ .chezmoi.os }}-config/txt
# apt [[[ # # apt [[[ #
# apti "sudo apt install" {{ if and (eq .chezmoi.username "root") (eq .linux_os "debian") }}
# aptr "sudo apt remove" ap "apt install"
# aptu "sudo apt upgrade" apr "apt remove"
apu "apt upgrade"
{{ end }}
# ]]] apt # # ]]] apt #
@@ -240,6 +243,10 @@ rdh "sudo killall dhcpcd && sudo dhcpcd"
wgt "wget" wgt "wget"
{{ if and (eq .chezmoi.username "root") (eq .linux_os "debian") }}
nt "nginx -t"
{{ end }}
# ]]] internet # # ]]] internet #
id "identify" id "identify"

View File

@@ -19,6 +19,11 @@ P ~/Pictures
std ~/st std ~/st
tm /tmp tm /tmp
{{ if and (eq .chezmoi.username "root") (eq .linux_os "debian") }}
ng /etc/nginx/sites-available
sv /etc/systemd/system
{{ end }}
# ]]] sys # # ]]] sys #
# cdn [[[ # # cdn [[[ #

View File

@@ -22,6 +22,10 @@ xi ~/linux-config/dot_xinitrc
y ~/.zshrc y ~/.zshrc
z ~/linux-config/aliases/zsh_aliases z ~/linux-config/aliases/zsh_aliases
{{ if and (eq .chezmoi.username "root") (eq .linux_os "debian") }}
ng /etc/nginx/nginx.conf
{{ end }}
# ]]] sys # # ]]] sys #
# cdn [[[ # # cdn [[[ #

View File

@@ -79,6 +79,7 @@ end
abbr ab "abbr" abbr ab "abbr"
abbr abe "abbr -e" abbr abe "abbr -e"
abbr hm "history merge"
# abbr rfc "chezmoi apply && source ~/.config/fish/config.fish" # abbr rfc "chezmoi apply && source ~/.config/fish/config.fish"
abbr f. "cd .." abbr f. "cd .."
abbr f.. "cd ../.." abbr f.. "cd ../.."
@@ -99,7 +100,9 @@ abbr cpc "copy cat"
abbr cpe "copy echo" abbr cpe "copy echo"
abbr cpp "copy echo (pwd)" abbr cpp "copy echo (pwd)"
abbr cff "create-fish-function" abbr cff "create-fish-function"
abbr ctr "systemctl-restart"
abbr def "define" abbr def "define"
abbr ens "enable-site"
abbr ev "evince-silent" abbr ev "evince-silent"
# abbr fbg "find-bg" # abbr fbg "find-bg"
abbr fvft "find-vim-filetype" abbr fvft "find-vim-filetype"
@@ -144,4 +147,4 @@ abbr jct "java-compile-test"
# ]]] fxn abbr's # # ]]] fxn abbr's #
abbr hm "cd $mfs_dir && hugo serve -D --disableFastRender" abbr hum "cd $mfs_dir && hugo serve -D --disableFastRender"

View File

@@ -0,0 +1,3 @@
function enable-site
ln -s (pwd)/$argv[1] ../sites-enabled
end

View File

@@ -0,0 +1,4 @@
function systemctl-restart
sudo systemctl restart $argv[1]
and sudo systemctl status $argv[1]
end