Last active
August 6, 2016 16:05
-
-
Save metalefty/36b99e6062051de3ab90c1a267779789 to your computer and use it in GitHub Desktop.
稼働中のシステムがsystemdかどうかを判定する
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
# check if the system is using systemd or not | |
[ "$(pgrep -o systemd)" = "1" ] && \ | |
USING_SYSTEMD=false || \ | |
USING_SYSTEMD=true | |
if $USING_SYSTEMD | |
then | |
# systemd だったときに実行するコマンド | |
else | |
# systemd じゃなかったときに実行するコマンド | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment