there's no need for albatross_x anymore, albatross keeps state itself these days
This commit is contained in:
parent
37ad18107e
commit
da8dcef6a0
|
@ -20,8 +20,7 @@ for f in albatross_log \
|
|||
albatross_console \
|
||||
albatross_daemon \
|
||||
albatross_influx \
|
||||
albatross_tls \
|
||||
albatross_x
|
||||
albatross_tls
|
||||
do install -U $basedir/packaging/rc.d/$f $rootdir/usr/local/etc/rc.d/$f; done
|
||||
|
||||
# stage albatross app binaries
|
||||
|
|
|
@ -1,76 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
# $FreeBSD$
|
||||
#
|
||||
# PROVIDE: albatross_x
|
||||
# REQUIRE: LOGIN albatross_daemon
|
||||
# KEYWORDS: shutdown
|
||||
#
|
||||
# Define these albatross_x_* variables in one of these files
|
||||
# /etc/rc.conf
|
||||
# /etc/rc.conf.local
|
||||
# /etc/rc.conf.d/albatross_x
|
||||
# /usr/local/etc/rc.conf.d/albatross_x
|
||||
#
|
||||
# albatross_x_enable: Set YES to enable the albatross vm start service
|
||||
# Default: NO
|
||||
# albatross_x_vms: list of vms to manage
|
||||
# Default: ""
|
||||
# albatross_x_args_$VM: vm create arguments
|
||||
#
|
||||
#
|
||||
|
||||
. /etc/rc.subr
|
||||
|
||||
name=albatross_x
|
||||
rcvar=${name}_enable
|
||||
desc="Manage Albatross VMs"
|
||||
load_rc_config $name
|
||||
start_cmd="albatross_x_start"
|
||||
stop_cmd="albatross_x_stop"
|
||||
status_cmd="albatross_x_status"
|
||||
extra_commands="status"
|
||||
|
||||
: ${albatross_x_enable:="NO"}
|
||||
: ${albatross_x_vms:=""}
|
||||
|
||||
albatross_x_start () {
|
||||
case $1 in
|
||||
_ALL)
|
||||
echo "Starting albatross VMs: ${albatross_x_vms}."
|
||||
for _vm in $albatross_x_vms; do
|
||||
eval _create_args=\"\$albatross_x_args_${_vm}\"
|
||||
/usr/local/sbin/albatross_client_local create $_vm $_create_args
|
||||
done
|
||||
return
|
||||
;;
|
||||
esac
|
||||
echo "Starting albatross VMs: ${@}."
|
||||
for _vm in $@; do
|
||||
eval _create_args=\"\$albatross_x_args_${_vm}\"
|
||||
/usr/local/sbin/albatross_client_local create $_vm $_create_args
|
||||
done
|
||||
}
|
||||
|
||||
albatross_x_stop () {
|
||||
case $1 in
|
||||
_ALL)
|
||||
echo "Stopping albatross VMs: ${albatross_x_vms}."
|
||||
for _vm in $albatross_x_vms
|
||||
do /usr/local/sbin/albatross_client_local destroy $_vm; done
|
||||
return
|
||||
esac
|
||||
echo "Stopping albatross VMs: ${@}."
|
||||
for _vm in $@
|
||||
do /usr/local/sbin/albatross_client_local destroy $_vm; done
|
||||
}
|
||||
|
||||
albatross_x_status () {
|
||||
/usr/local/sbin/albatross_client_local info
|
||||
}
|
||||
|
||||
case $# in
|
||||
1) run_rc_command $@ ${albatross_x_list:-_ALL} ;;
|
||||
*) run_rc_command $@ ;;
|
||||
esac
|
||||
|
Loading…
Reference in a new issue