Skip to content

Instantly share code, notes, and snippets.

@robbat2
Created April 27, 2019 20:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save robbat2/380ecaa9a9f8f6905653f49bc0e04416 to your computer and use it in GitHub Desktop.
Save robbat2/380ecaa9a9f8f6905653f49bc0e04416 to your computer and use it in GitHub Desktop.
lvm udev init.d demo for rc_need
#!/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