-
-
Save Ikke/9353775 to your computer and use it in GitHub Desktop.
Shortcuts for systemctl
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
sys="sudo /usr/bin/systemctl" | |
case "$1" in | |
s) shift 1 | |
$sys status $@ | |
;; | |
o) shift 1 | |
$sys stop $@ | |
;; | |
a) shift 1 | |
$sys start $@ | |
;; | |
r) shift 1 | |
$sys restart $@ | |
;; | |
e) shift 1 | |
$sys enable $@ | |
;; | |
d) shift 1 | |
$sys disable $@ | |
;; | |
*) $sys $@ | |
;; | |
esac |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment