FreeBSD rc scripts: echo start/stop actions

behave like all the other rc scripts
This commit is contained in:
Stefan Grundmann 2018-11-08 08:50:20 +00:00
parent 0bc0f7be7f
commit cd911ae68d
7 changed files with 10 additions and 0 deletions

View file

@ -32,6 +32,7 @@ pidfile="/var/run/albatross_console.pid"
procname="/usr/local/libexec/albatross/vmmd_console" procname="/usr/local/libexec/albatross/vmmd_console"
albatross_console_start () { albatross_console_start () {
echo "Starting ${name}."
/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}
} }

View file

@ -67,6 +67,7 @@ albatross_daemon_precmd() {
} }
albatross_daemon_start () { albatross_daemon_start () {
echo "Starting ${name}."
/usr/sbin/daemon -S -p "${pidfile}" "${procname}" \ /usr/sbin/daemon -S -p "${pidfile}" "${procname}" \
${albatross_daemon_flags} ${albatross_daemon_flags}
} }

View file

@ -62,6 +62,7 @@ albatross_influx_precmd() {
} }
albatross_influx_start () { albatross_influx_start () {
echo "Starting ${name}."
/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}
} }

View file

@ -40,6 +40,7 @@ albatross_log_precmd () {
} }
albatross_log_start () { albatross_log_start () {
echo "Starting ${name}."
/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}
} }

View file

@ -32,6 +32,7 @@ pidfile="/var/run/albatross_stat.pid"
procname="/usr/local/libexec/albatross/vmmd_stats" procname="/usr/local/libexec/albatross/vmmd_stats"
albatross_stat_start () { albatross_stat_start () {
echo "Starting ${name}."
/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}
} }

View file

@ -62,6 +62,7 @@ albatross_tls_precmd() {
} }
albatross_tls_start () { albatross_tls_start () {
echo "Starting ${name}."
/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}
} }

View file

@ -37,6 +37,7 @@ extra_commands="status"
albatross_x_start () { albatross_x_start () {
case $1 in case $1 in
_ALL) _ALL)
echo "Starting albatross VMs: ${albatross_x_vms}."
for _vm in $albatross_x_vms; do for _vm in $albatross_x_vms; do
eval _create_args=\"\$albatross_x_args_${_vm}\" eval _create_args=\"\$albatross_x_args_${_vm}\"
/usr/local/sbin/vmmc_local create $_vm $_create_args /usr/local/sbin/vmmc_local create $_vm $_create_args
@ -44,6 +45,7 @@ albatross_x_start () {
return return
;; ;;
esac esac
echo "Starting albatross VMs: ${@}."
for _vm in $@; do for _vm in $@; do
eval _create_args=\"\$albatross_x_args_${_vm}\" eval _create_args=\"\$albatross_x_args_${_vm}\"
/usr/local/sbin/vmmc_local create $_vm $_create_args /usr/local/sbin/vmmc_local create $_vm $_create_args
@ -53,10 +55,12 @@ albatross_x_start () {
albatross_x_stop () { albatross_x_stop () {
case $1 in case $1 in
_ALL) _ALL)
echo "Stopping albatross VMs: ${albatross_x_vms}."
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
esac esac
echo "Stopping albatross VMs: ${@}."
for _vm in $@ for _vm in $@
do /usr/local/sbin/vmmc_local destroy $_vm; done do /usr/local/sbin/vmmc_local destroy $_vm; done
} }