Created
April 27, 2019 20:11
-
-
Save robbat2/380ecaa9a9f8f6905653f49bc0e04416 to your computer and use it in GitHub Desktop.
lvm udev init.d demo for rc_need
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
rc_need=udev |
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
#!/sbin/openrc-run | |
# Copyright 2019 Gentoo Authors | |
# Distributed under the terms of the GNU General Public License v2 | |
demo_args=${demo_args:-30d} | |
name="demo daemon" | |
description="" | |
command=/bin/sleep | |
start_stop_daemon_args="--background --make-pidfile" | |
command_args="${demo_args}" | |
pidfile=/run/demo.pid | |
depend() { | |
if service_started; then | |
_need=$(service_get_value need) | |
else | |
_need=$rc_need | |
fi | |
need ${_need} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment