Merge pull request #17 from sg2342/freebsd-system-services

Freebsd system services
This commit is contained in:
Hannes Mehnert 2018-11-08 09:52:31 +01:00 committed by GitHub
commit 0bc0f7be7f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 15 additions and 16 deletions

View file

@ -4,7 +4,7 @@
# #
# PROVIDE: albatross_console # PROVIDE: albatross_console
# REQUIRE: LOGIN # REQUIRE: LOGIN
# KEYWORD: shutdown nojail # KEYWORD: shutdown
# #
# Define these albatross_console_* variables in one of these files # Define these albatross_console_* variables in one of these files
# /etc/rc.conf # /etc/rc.conf
@ -33,7 +33,7 @@ procname="/usr/local/libexec/albatross/vmmd_console"
albatross_console_start () { albatross_console_start () {
/usr/sbin/daemon -S -p "${pidfile}" -u "${albatross_console_user}" \ /usr/sbin/daemon -S -p "${pidfile}" -u "${albatross_console_user}" \
"${procname}" "${albatross_console_flags}" "${procname}" ${albatross_console_flags}
} }
run_rc_command "$1" run_rc_command "$1"

View file

@ -4,7 +4,7 @@
# #
# PROVIDE: albatross_daemon # PROVIDE: albatross_daemon
# REQUIRE: LOGIN albatross_console albatross_log albatross_stat # REQUIRE: LOGIN albatross_console albatross_log albatross_stat
# KEYWORD: shutdown nojail # KEYWORD: shutdown
# #
# Define these albatross_daemon_* variables in one of these files # Define these albatross_daemon_* variables in one of these files
# /etc/rc.conf # /etc/rc.conf
@ -68,7 +68,7 @@ albatross_daemon_precmd() {
albatross_daemon_start () { albatross_daemon_start () {
/usr/sbin/daemon -S -p "${pidfile}" "${procname}" \ /usr/sbin/daemon -S -p "${pidfile}" "${procname}" \
"${albatross_daemon_flags}" ${albatross_daemon_flags}
} }
run_rc_command "$1" run_rc_command "$1"

View file

@ -4,7 +4,7 @@
# #
# PROVIDE: albatross_influx # PROVIDE: albatross_influx
# REQUIRE: LOGIN albatross_stat # REQUIRE: LOGIN albatross_stat
# KEYWORD: shutdown nojail # KEYWORD: shutdown
# #
# Define these albatross_influx_* variables in one of these files # Define these albatross_influx_* variables in one of these files
# /etc/rc.conf # /etc/rc.conf
@ -63,7 +63,7 @@ albatross_influx_precmd() {
albatross_influx_start () { albatross_influx_start () {
/usr/sbin/daemon -S -p "${pidfile}" -u "${albatross_influx_user}" \ /usr/sbin/daemon -S -p "${pidfile}" -u "${albatross_influx_user}" \
"${procname}" "${albatross_influx_flags}" "${procname}" ${albatross_influx_flags}
} }
run_rc_command "$1" run_rc_command "$1"

View file

@ -4,7 +4,7 @@
# #
# PROVIDE: albatross_log # PROVIDE: albatross_log
# REQUIRE: LOGIN # REQUIRE: LOGIN
# KEYWORD: shutdown nojail # KEYWORD: shutdown
# #
# Define these albatross_log_* variables in one of these files # Define these albatross_log_* variables in one of these files
# /etc/rc.conf # /etc/rc.conf
@ -41,7 +41,7 @@ albatross_log_precmd () {
albatross_log_start () { albatross_log_start () {
/usr/sbin/daemon -S -p "${pidfile}" -u "${albatross_log_user}" \ /usr/sbin/daemon -S -p "${pidfile}" -u "${albatross_log_user}" \
"${procname}" "${albatross_log_flags}" "${procname}" ${albatross_log_flags}
} }
run_rc_command "$1" run_rc_command "$1"

View file

@ -4,7 +4,7 @@
# #
# PROVIDE: albatross_stat # PROVIDE: albatross_stat
# REQUIRE: LOGIN # REQUIRE: LOGIN
# KEYWORD: shutdown nojail # KEYWORD: shutdown
# #
# Define these albatross_stat_* variables in one of these files # Define these albatross_stat_* variables in one of these files
# /etc/rc.conf # /etc/rc.conf
@ -33,7 +33,7 @@ procname="/usr/local/libexec/albatross/vmmd_stats"
albatross_stat_start () { albatross_stat_start () {
/usr/sbin/daemon -S -p "${pidfile}" -u "${albatross_stat_user}" \ /usr/sbin/daemon -S -p "${pidfile}" -u "${albatross_stat_user}" \
"${procname}" "${albatross_stat_flags}" "${procname}" ${albatross_stat_flags}
} }
run_rc_command "$1" run_rc_command "$1"

View file

@ -4,7 +4,7 @@
# #
# PROVIDE: albatross_tls # PROVIDE: albatross_tls
# REQUIRE: LOGIN albatross_daemon # REQUIRE: LOGIN albatross_daemon
# KEYWORD: shutdown nojail # KEYWORD: shutdown
# #
# Define these albatross_tls_* variables in one of these files # Define these albatross_tls_* variables in one of these files
# /etc/rc.conf # /etc/rc.conf
@ -63,7 +63,7 @@ albatross_tls_precmd() {
albatross_tls_start () { albatross_tls_start () {
/usr/sbin/daemon -S -p "${pidfile}" -u "${albatross_tls_user}" \ /usr/sbin/daemon -S -p "${pidfile}" -u "${albatross_tls_user}" \
"${procname}" "${albatross_tls_flags}" "${procname}" ${albatross_tls_flags}
} }
run_rc_command "$1" run_rc_command "$1"

View file

@ -4,7 +4,7 @@
# #
# PROVIDE: albatross_x # PROVIDE: albatross_x
# REQUIRE: LOGIN albatross_daemon # REQUIRE: LOGIN albatross_daemon
# KEYWORDS: shutdown nojail # KEYWORDS: shutdown
# #
# Define these albatross_x_* variables in one of these files # Define these albatross_x_* variables in one of these files
# /etc/rc.conf # /etc/rc.conf
@ -52,7 +52,7 @@ albatross_x_start () {
albatross_x_stop () { albatross_x_stop () {
case $1 in case $1 in
ALL) _ALL)
for _vm in $albatross_x_vms for _vm in $albatross_x_vms
do /usr/local/sbin/vmmc_local destroy $_vm; done do /usr/local/sbin/vmmc_local destroy $_vm; done
return return
@ -62,8 +62,7 @@ albatross_x_stop () {
} }
albatross_x_status () { albatross_x_status () {
for _vm in $@ /usr/local/sbin/vmmc_local info
do /usr/local/sbin/vmmc_local info $_vm; done
} }
case $# in case $# in