Last active
August 27, 2017 06:32
-
-
Save ageis/e9043ff9b4fdd9cfe12e7a82b36cba91 to your computer and use it in GitHub Desktop.
systemd service unit management in minimal keystrokes.
This file contains 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 | |
function stop () { | |
sudo systemctl stop "$1" | |
sleep 3s | |
} | |
function start () { | |
sleep 3s | |
sudo systemctl start "$1" | |
} | |
function status () { | |
sudo systemctl status "$1" | |
} | |
function reload () { | |
sudo systemctl reload "$1" | |
} | |
function restart () { | |
sudo systemctl restart "$1" | |
} | |
function viewlog () { | |
sudo journalctl -e -u "$1" | |
} | |
function kicksysd () { | |
sudo systemctl daemon-reload | |
sudo systemctl reset-failed | |
} | |
function disablesvc () { | |
sudo systemctl disable "$1" | |
} | |
function enablesvc () { | |
sudo systemctl enable "$1" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment