halt/reboot via sudo aliases

This commit is contained in:
Marco Grifantini 2020-12-19 08:00:37 +00:00
parent c27838f0a2
commit c11f48adc4

View file

@ -21,6 +21,12 @@ alias ln='ln -i'
alias chown='chown --preserve-root' alias chown='chown --preserve-root'
alias chmod='chmod --preserve-root' alias chmod='chmod --preserve-root'
alias chgrp='chgrp --preserve-root' alias chgrp='chgrp --preserve-root'
#20: Pass halt/reboot via sudo
# reboot / halt / poweroff
alias reboot='sudo /sbin/reboot'
alias poweroff='sudo /sbin/poweroff'
alias halt='sudo /sbin/halt'
alias shutdown='sudo /sbin/shutdown'
#21: Control web servers #21: Control web servers
# also pass it via sudo so whoever is admin can reload it without calling you # # also pass it via sudo so whoever is admin can reload it without calling you #
alias nginxreload='sudo /usr/local/nginx/sbin/nginx -s reload' alias nginxreload='sudo /usr/local/nginx/sbin/nginx -s reload'
@ -32,3 +38,4 @@ alias httpdtest='sudo /usr/sbin/apachectl -t && /usr/sbin/apachectl -t -D DUMP_V
#27 Resume wget by default #27 Resume wget by default
## this one saved by butt so many times ## ## this one saved by butt so many times ##
alias wget='wget -c' alias wget='wget -c'