...
This commit is contained in:
@@ -38,6 +38,7 @@ pub fn get(args ArgsGet) !&CometBFT {
|
|||||||
if r.hexists('context:cometbft', args.name)! {
|
if r.hexists('context:cometbft', args.name)! {
|
||||||
data := r.hget('context:cometbft', args.name)!
|
data := r.hget('context:cometbft', args.name)!
|
||||||
if data.len == 0 {
|
if data.len == 0 {
|
||||||
|
print_backtrace()
|
||||||
return error('CometBFT with name: cometbft does not exist, prob bug.')
|
return error('CometBFT with name: cometbft does not exist, prob bug.')
|
||||||
}
|
}
|
||||||
mut obj := json.decode(CometBFT, data)!
|
mut obj := json.decode(CometBFT, data)!
|
||||||
@@ -46,12 +47,14 @@ pub fn get(args ArgsGet) !&CometBFT {
|
|||||||
if args.create {
|
if args.create {
|
||||||
new(args)!
|
new(args)!
|
||||||
} else {
|
} else {
|
||||||
|
print_backtrace()
|
||||||
return error("CometBFT with name 'cometbft' does not exist")
|
return error("CometBFT with name 'cometbft' does not exist")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return get(name: args.name)! // no longer from db nor create
|
return get(name: args.name)! // no longer from db nor create
|
||||||
}
|
}
|
||||||
return cometbft_global[args.name] or {
|
return cometbft_global[args.name] or {
|
||||||
|
print_backtrace()
|
||||||
return error('could not get config for cometbft with name:cometbft')
|
return error('could not get config for cometbft with name:cometbft')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -124,14 +127,15 @@ pub fn play(mut plbook PlayBook) ! {
|
|||||||
}
|
}
|
||||||
mut install_actions := plbook.find(filter: 'cometbft.configure')!
|
mut install_actions := plbook.find(filter: 'cometbft.configure')!
|
||||||
if install_actions.len > 0 {
|
if install_actions.len > 0 {
|
||||||
for install_action in install_actions {
|
for mut install_action in install_actions {
|
||||||
heroscript := install_action.heroscript()
|
heroscript := install_action.heroscript()
|
||||||
mut obj2 := heroscript_loads(heroscript)!
|
mut obj2 := heroscript_loads(heroscript)!
|
||||||
set(obj2)!
|
set(obj2)!
|
||||||
|
install_action.done = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
mut other_actions := plbook.find(filter: 'cometbft.')!
|
mut other_actions := plbook.find(filter: 'cometbft.')!
|
||||||
for other_action in other_actions {
|
for mut other_action in other_actions {
|
||||||
if other_action.name in ['destroy', 'install', 'build'] {
|
if other_action.name in ['destroy', 'install', 'build'] {
|
||||||
mut p := other_action.params
|
mut p := other_action.params
|
||||||
reset := p.get_default_false('reset')
|
reset := p.get_default_false('reset')
|
||||||
@@ -163,6 +167,7 @@ pub fn play(mut plbook PlayBook) ! {
|
|||||||
cometbft_obj.restart()!
|
cometbft_obj.restart()!
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
other_action.done = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -178,19 +183,19 @@ fn startupmanager_get(cat startupmanager.StartupManagerType) !startupmanager.Sta
|
|||||||
// systemd
|
// systemd
|
||||||
match cat {
|
match cat {
|
||||||
.screen {
|
.screen {
|
||||||
console.print_debug('startupmanager: screen')
|
console.print_debug("installer: cometbft' startupmanager get screen")
|
||||||
return startupmanager.get(.screen)!
|
return startupmanager.get(.screen)!
|
||||||
}
|
}
|
||||||
.zinit {
|
.zinit {
|
||||||
console.print_debug('startupmanager: zinit')
|
console.print_debug("installer: cometbft' startupmanager get zinit")
|
||||||
return startupmanager.get(.zinit)!
|
return startupmanager.get(.zinit)!
|
||||||
}
|
}
|
||||||
.systemd {
|
.systemd {
|
||||||
console.print_debug('startupmanager: systemd')
|
console.print_debug("installer: cometbft' startupmanager get systemd")
|
||||||
return startupmanager.get(.systemd)!
|
return startupmanager.get(.systemd)!
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
console.print_debug('startupmanager: auto')
|
console.print_debug("installer: cometbft' startupmanager get auto")
|
||||||
return startupmanager.get(.auto)!
|
return startupmanager.get(.auto)!
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -208,7 +213,7 @@ pub fn (mut self CometBFT) start() ! {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
console.print_header('cometbft start')
|
console.print_header('installer: cometbft start')
|
||||||
|
|
||||||
if !installed()! {
|
if !installed()! {
|
||||||
install()!
|
install()!
|
||||||
@@ -221,7 +226,7 @@ pub fn (mut self CometBFT) start() ! {
|
|||||||
for zprocess in startupcmd()! {
|
for zprocess in startupcmd()! {
|
||||||
mut sm := startupmanager_get(zprocess.startuptype)!
|
mut sm := startupmanager_get(zprocess.startuptype)!
|
||||||
|
|
||||||
console.print_debug('starting cometbft with ${zprocess.startuptype}...')
|
console.print_debug('installer: cometbft starting with ${zprocess.startuptype}...')
|
||||||
|
|
||||||
sm.new(zprocess)!
|
sm.new(zprocess)!
|
||||||
|
|
||||||
|
|||||||
@@ -38,6 +38,7 @@ pub fn get(args ArgsGet) !&MeilisearchInstaller {
|
|||||||
if r.hexists('context:meilisearch_installer', args.name)! {
|
if r.hexists('context:meilisearch_installer', args.name)! {
|
||||||
data := r.hget('context:meilisearch_installer', args.name)!
|
data := r.hget('context:meilisearch_installer', args.name)!
|
||||||
if data.len == 0 {
|
if data.len == 0 {
|
||||||
|
print_backtrace()
|
||||||
return error('MeilisearchInstaller with name: meilisearch_installer does not exist, prob bug.')
|
return error('MeilisearchInstaller with name: meilisearch_installer does not exist, prob bug.')
|
||||||
}
|
}
|
||||||
mut obj := json.decode(MeilisearchInstaller, data)!
|
mut obj := json.decode(MeilisearchInstaller, data)!
|
||||||
@@ -46,12 +47,14 @@ pub fn get(args ArgsGet) !&MeilisearchInstaller {
|
|||||||
if args.create {
|
if args.create {
|
||||||
new(args)!
|
new(args)!
|
||||||
} else {
|
} else {
|
||||||
|
print_backtrace()
|
||||||
return error("MeilisearchInstaller with name 'meilisearch_installer' does not exist")
|
return error("MeilisearchInstaller with name 'meilisearch_installer' does not exist")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return get(name: args.name)! // no longer from db nor create
|
return get(name: args.name)! // no longer from db nor create
|
||||||
}
|
}
|
||||||
return meilisearch_installer_global[args.name] or {
|
return meilisearch_installer_global[args.name] or {
|
||||||
|
print_backtrace()
|
||||||
return error('could not get config for meilisearch_installer with name:meilisearch_installer')
|
return error('could not get config for meilisearch_installer with name:meilisearch_installer')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -124,14 +127,15 @@ pub fn play(mut plbook PlayBook) ! {
|
|||||||
}
|
}
|
||||||
mut install_actions := plbook.find(filter: 'meilisearch_installer.configure')!
|
mut install_actions := plbook.find(filter: 'meilisearch_installer.configure')!
|
||||||
if install_actions.len > 0 {
|
if install_actions.len > 0 {
|
||||||
for install_action in install_actions {
|
for mut install_action in install_actions {
|
||||||
heroscript := install_action.heroscript()
|
heroscript := install_action.heroscript()
|
||||||
mut obj2 := heroscript_loads(heroscript)!
|
mut obj2 := heroscript_loads(heroscript)!
|
||||||
set(obj2)!
|
set(obj2)!
|
||||||
|
install_action.done = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
mut other_actions := plbook.find(filter: 'meilisearch_installer.')!
|
mut other_actions := plbook.find(filter: 'meilisearch_installer.')!
|
||||||
for other_action in other_actions {
|
for mut other_action in other_actions {
|
||||||
if other_action.name in ['destroy', 'install', 'build'] {
|
if other_action.name in ['destroy', 'install', 'build'] {
|
||||||
mut p := other_action.params
|
mut p := other_action.params
|
||||||
reset := p.get_default_false('reset')
|
reset := p.get_default_false('reset')
|
||||||
@@ -163,6 +167,7 @@ pub fn play(mut plbook PlayBook) ! {
|
|||||||
meilisearch_installer_obj.restart()!
|
meilisearch_installer_obj.restart()!
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
other_action.done = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -178,19 +183,19 @@ fn startupmanager_get(cat startupmanager.StartupManagerType) !startupmanager.Sta
|
|||||||
// systemd
|
// systemd
|
||||||
match cat {
|
match cat {
|
||||||
.screen {
|
.screen {
|
||||||
console.print_debug('startupmanager: screen')
|
console.print_debug("installer: meilisearch_installer' startupmanager get screen")
|
||||||
return startupmanager.get(.screen)!
|
return startupmanager.get(.screen)!
|
||||||
}
|
}
|
||||||
.zinit {
|
.zinit {
|
||||||
console.print_debug('startupmanager: zinit')
|
console.print_debug("installer: meilisearch_installer' startupmanager get zinit")
|
||||||
return startupmanager.get(.zinit)!
|
return startupmanager.get(.zinit)!
|
||||||
}
|
}
|
||||||
.systemd {
|
.systemd {
|
||||||
console.print_debug('startupmanager: systemd')
|
console.print_debug("installer: meilisearch_installer' startupmanager get systemd")
|
||||||
return startupmanager.get(.systemd)!
|
return startupmanager.get(.systemd)!
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
console.print_debug('startupmanager: auto')
|
console.print_debug("installer: meilisearch_installer' startupmanager get auto")
|
||||||
return startupmanager.get(.auto)!
|
return startupmanager.get(.auto)!
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -208,7 +213,7 @@ pub fn (mut self MeilisearchInstaller) start() ! {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
console.print_header('meilisearch_installer start')
|
console.print_header('installer: meilisearch_installer start')
|
||||||
|
|
||||||
if !installed()! {
|
if !installed()! {
|
||||||
install()!
|
install()!
|
||||||
@@ -221,7 +226,7 @@ pub fn (mut self MeilisearchInstaller) start() ! {
|
|||||||
for zprocess in startupcmd()! {
|
for zprocess in startupcmd()! {
|
||||||
mut sm := startupmanager_get(zprocess.startuptype)!
|
mut sm := startupmanager_get(zprocess.startuptype)!
|
||||||
|
|
||||||
console.print_debug('starting meilisearch_installer with ${zprocess.startuptype}...')
|
console.print_debug('installer: meilisearch_installer starting with ${zprocess.startuptype}...')
|
||||||
|
|
||||||
sm.new(zprocess)!
|
sm.new(zprocess)!
|
||||||
|
|
||||||
|
|||||||
@@ -38,6 +38,7 @@ pub fn get(args ArgsGet) !&Postgresql {
|
|||||||
if r.hexists('context:postgresql', args.name)! {
|
if r.hexists('context:postgresql', args.name)! {
|
||||||
data := r.hget('context:postgresql', args.name)!
|
data := r.hget('context:postgresql', args.name)!
|
||||||
if data.len == 0 {
|
if data.len == 0 {
|
||||||
|
print_backtrace()
|
||||||
return error('Postgresql with name: postgresql does not exist, prob bug.')
|
return error('Postgresql with name: postgresql does not exist, prob bug.')
|
||||||
}
|
}
|
||||||
mut obj := json.decode(Postgresql, data)!
|
mut obj := json.decode(Postgresql, data)!
|
||||||
@@ -46,12 +47,14 @@ pub fn get(args ArgsGet) !&Postgresql {
|
|||||||
if args.create {
|
if args.create {
|
||||||
new(args)!
|
new(args)!
|
||||||
} else {
|
} else {
|
||||||
|
print_backtrace()
|
||||||
return error("Postgresql with name 'postgresql' does not exist")
|
return error("Postgresql with name 'postgresql' does not exist")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return get(name: args.name)! // no longer from db nor create
|
return get(name: args.name)! // no longer from db nor create
|
||||||
}
|
}
|
||||||
return postgresql_global[args.name] or {
|
return postgresql_global[args.name] or {
|
||||||
|
print_backtrace()
|
||||||
return error('could not get config for postgresql with name:postgresql')
|
return error('could not get config for postgresql with name:postgresql')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -124,14 +127,15 @@ pub fn play(mut plbook PlayBook) ! {
|
|||||||
}
|
}
|
||||||
mut install_actions := plbook.find(filter: 'postgresql.configure')!
|
mut install_actions := plbook.find(filter: 'postgresql.configure')!
|
||||||
if install_actions.len > 0 {
|
if install_actions.len > 0 {
|
||||||
for install_action in install_actions {
|
for mut install_action in install_actions {
|
||||||
heroscript := install_action.heroscript()
|
heroscript := install_action.heroscript()
|
||||||
mut obj2 := heroscript_loads(heroscript)!
|
mut obj2 := heroscript_loads(heroscript)!
|
||||||
set(obj2)!
|
set(obj2)!
|
||||||
|
install_action.done = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
mut other_actions := plbook.find(filter: 'postgresql.')!
|
mut other_actions := plbook.find(filter: 'postgresql.')!
|
||||||
for other_action in other_actions {
|
for mut other_action in other_actions {
|
||||||
if other_action.name in ['destroy', 'install', 'build'] {
|
if other_action.name in ['destroy', 'install', 'build'] {
|
||||||
mut p := other_action.params
|
mut p := other_action.params
|
||||||
reset := p.get_default_false('reset')
|
reset := p.get_default_false('reset')
|
||||||
@@ -163,6 +167,7 @@ pub fn play(mut plbook PlayBook) ! {
|
|||||||
postgresql_obj.restart()!
|
postgresql_obj.restart()!
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
other_action.done = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -178,19 +183,19 @@ fn startupmanager_get(cat startupmanager.StartupManagerType) !startupmanager.Sta
|
|||||||
// systemd
|
// systemd
|
||||||
match cat {
|
match cat {
|
||||||
.screen {
|
.screen {
|
||||||
console.print_debug('startupmanager: screen')
|
console.print_debug("installer: postgresql' startupmanager get screen")
|
||||||
return startupmanager.get(.screen)!
|
return startupmanager.get(.screen)!
|
||||||
}
|
}
|
||||||
.zinit {
|
.zinit {
|
||||||
console.print_debug('startupmanager: zinit')
|
console.print_debug("installer: postgresql' startupmanager get zinit")
|
||||||
return startupmanager.get(.zinit)!
|
return startupmanager.get(.zinit)!
|
||||||
}
|
}
|
||||||
.systemd {
|
.systemd {
|
||||||
console.print_debug('startupmanager: systemd')
|
console.print_debug("installer: postgresql' startupmanager get systemd")
|
||||||
return startupmanager.get(.systemd)!
|
return startupmanager.get(.systemd)!
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
console.print_debug('startupmanager: auto')
|
console.print_debug("installer: postgresql' startupmanager get auto")
|
||||||
return startupmanager.get(.auto)!
|
return startupmanager.get(.auto)!
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -206,7 +211,7 @@ pub fn (mut self Postgresql) start() ! {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
console.print_header('postgresql start')
|
console.print_header('installer: postgresql start')
|
||||||
|
|
||||||
if !installed()! {
|
if !installed()! {
|
||||||
install()!
|
install()!
|
||||||
@@ -219,7 +224,7 @@ pub fn (mut self Postgresql) start() ! {
|
|||||||
for zprocess in startupcmd()! {
|
for zprocess in startupcmd()! {
|
||||||
mut sm := startupmanager_get(zprocess.startuptype)!
|
mut sm := startupmanager_get(zprocess.startuptype)!
|
||||||
|
|
||||||
console.print_debug('starting postgresql with ${zprocess.startuptype}...')
|
console.print_debug('installer: postgresql starting with ${zprocess.startuptype}...')
|
||||||
|
|
||||||
sm.new(zprocess)!
|
sm.new(zprocess)!
|
||||||
|
|
||||||
|
|||||||
@@ -38,6 +38,7 @@ pub fn get(args ArgsGet) !&QDrant {
|
|||||||
if r.hexists('context:qdrant_installer', args.name)! {
|
if r.hexists('context:qdrant_installer', args.name)! {
|
||||||
data := r.hget('context:qdrant_installer', args.name)!
|
data := r.hget('context:qdrant_installer', args.name)!
|
||||||
if data.len == 0 {
|
if data.len == 0 {
|
||||||
|
print_backtrace()
|
||||||
return error('QDrant with name: qdrant_installer does not exist, prob bug.')
|
return error('QDrant with name: qdrant_installer does not exist, prob bug.')
|
||||||
}
|
}
|
||||||
mut obj := json.decode(QDrant, data)!
|
mut obj := json.decode(QDrant, data)!
|
||||||
@@ -46,12 +47,14 @@ pub fn get(args ArgsGet) !&QDrant {
|
|||||||
if args.create {
|
if args.create {
|
||||||
new(args)!
|
new(args)!
|
||||||
} else {
|
} else {
|
||||||
|
print_backtrace()
|
||||||
return error("QDrant with name 'qdrant_installer' does not exist")
|
return error("QDrant with name 'qdrant_installer' does not exist")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return get(name: args.name)! // no longer from db nor create
|
return get(name: args.name)! // no longer from db nor create
|
||||||
}
|
}
|
||||||
return qdrant_installer_global[args.name] or {
|
return qdrant_installer_global[args.name] or {
|
||||||
|
print_backtrace()
|
||||||
return error('could not get config for qdrant_installer with name:qdrant_installer')
|
return error('could not get config for qdrant_installer with name:qdrant_installer')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -124,14 +127,15 @@ pub fn play(mut plbook PlayBook) ! {
|
|||||||
}
|
}
|
||||||
mut install_actions := plbook.find(filter: 'qdrant_installer.configure')!
|
mut install_actions := plbook.find(filter: 'qdrant_installer.configure')!
|
||||||
if install_actions.len > 0 {
|
if install_actions.len > 0 {
|
||||||
for install_action in install_actions {
|
for mut install_action in install_actions {
|
||||||
heroscript := install_action.heroscript()
|
heroscript := install_action.heroscript()
|
||||||
mut obj2 := heroscript_loads(heroscript)!
|
mut obj2 := heroscript_loads(heroscript)!
|
||||||
set(obj2)!
|
set(obj2)!
|
||||||
|
install_action.done = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
mut other_actions := plbook.find(filter: 'qdrant_installer.')!
|
mut other_actions := plbook.find(filter: 'qdrant_installer.')!
|
||||||
for other_action in other_actions {
|
for mut other_action in other_actions {
|
||||||
if other_action.name in ['destroy', 'install', 'build'] {
|
if other_action.name in ['destroy', 'install', 'build'] {
|
||||||
mut p := other_action.params
|
mut p := other_action.params
|
||||||
reset := p.get_default_false('reset')
|
reset := p.get_default_false('reset')
|
||||||
@@ -163,6 +167,7 @@ pub fn play(mut plbook PlayBook) ! {
|
|||||||
qdrant_installer_obj.restart()!
|
qdrant_installer_obj.restart()!
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
other_action.done = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -178,19 +183,19 @@ fn startupmanager_get(cat startupmanager.StartupManagerType) !startupmanager.Sta
|
|||||||
// systemd
|
// systemd
|
||||||
match cat {
|
match cat {
|
||||||
.screen {
|
.screen {
|
||||||
console.print_debug('startupmanager: screen')
|
console.print_debug("installer: qdrant_installer' startupmanager get screen")
|
||||||
return startupmanager.get(.screen)!
|
return startupmanager.get(.screen)!
|
||||||
}
|
}
|
||||||
.zinit {
|
.zinit {
|
||||||
console.print_debug('startupmanager: zinit')
|
console.print_debug("installer: qdrant_installer' startupmanager get zinit")
|
||||||
return startupmanager.get(.zinit)!
|
return startupmanager.get(.zinit)!
|
||||||
}
|
}
|
||||||
.systemd {
|
.systemd {
|
||||||
console.print_debug('startupmanager: systemd')
|
console.print_debug("installer: qdrant_installer' startupmanager get systemd")
|
||||||
return startupmanager.get(.systemd)!
|
return startupmanager.get(.systemd)!
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
console.print_debug('startupmanager: auto')
|
console.print_debug("installer: qdrant_installer' startupmanager get auto")
|
||||||
return startupmanager.get(.auto)!
|
return startupmanager.get(.auto)!
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -208,7 +213,7 @@ pub fn (mut self QDrant) start() ! {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
console.print_header('qdrant_installer start')
|
console.print_header('installer: qdrant_installer start')
|
||||||
|
|
||||||
if !installed()! {
|
if !installed()! {
|
||||||
install()!
|
install()!
|
||||||
@@ -221,7 +226,7 @@ pub fn (mut self QDrant) start() ! {
|
|||||||
for zprocess in startupcmd()! {
|
for zprocess in startupcmd()! {
|
||||||
mut sm := startupmanager_get(zprocess.startuptype)!
|
mut sm := startupmanager_get(zprocess.startuptype)!
|
||||||
|
|
||||||
console.print_debug('starting qdrant_installer with ${zprocess.startuptype}...')
|
console.print_debug('installer: qdrant_installer starting with ${zprocess.startuptype}...')
|
||||||
|
|
||||||
sm.new(zprocess)!
|
sm.new(zprocess)!
|
||||||
|
|
||||||
|
|||||||
@@ -38,6 +38,7 @@ pub fn get(args ArgsGet) !&ZeroDB {
|
|||||||
if r.hexists('context:zerodb', args.name)! {
|
if r.hexists('context:zerodb', args.name)! {
|
||||||
data := r.hget('context:zerodb', args.name)!
|
data := r.hget('context:zerodb', args.name)!
|
||||||
if data.len == 0 {
|
if data.len == 0 {
|
||||||
|
print_backtrace()
|
||||||
return error('ZeroDB with name: zerodb does not exist, prob bug.')
|
return error('ZeroDB with name: zerodb does not exist, prob bug.')
|
||||||
}
|
}
|
||||||
mut obj := json.decode(ZeroDB, data)!
|
mut obj := json.decode(ZeroDB, data)!
|
||||||
@@ -46,12 +47,14 @@ pub fn get(args ArgsGet) !&ZeroDB {
|
|||||||
if args.create {
|
if args.create {
|
||||||
new(args)!
|
new(args)!
|
||||||
} else {
|
} else {
|
||||||
|
print_backtrace()
|
||||||
return error("ZeroDB with name 'zerodb' does not exist")
|
return error("ZeroDB with name 'zerodb' does not exist")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return get(name: args.name)! // no longer from db nor create
|
return get(name: args.name)! // no longer from db nor create
|
||||||
}
|
}
|
||||||
return zerodb_global[args.name] or {
|
return zerodb_global[args.name] or {
|
||||||
|
print_backtrace()
|
||||||
return error('could not get config for zerodb with name:zerodb')
|
return error('could not get config for zerodb with name:zerodb')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -124,14 +127,15 @@ pub fn play(mut plbook PlayBook) ! {
|
|||||||
}
|
}
|
||||||
mut install_actions := plbook.find(filter: 'zerodb.configure')!
|
mut install_actions := plbook.find(filter: 'zerodb.configure')!
|
||||||
if install_actions.len > 0 {
|
if install_actions.len > 0 {
|
||||||
for install_action in install_actions {
|
for mut install_action in install_actions {
|
||||||
heroscript := install_action.heroscript()
|
heroscript := install_action.heroscript()
|
||||||
mut obj2 := heroscript_loads(heroscript)!
|
mut obj2 := heroscript_loads(heroscript)!
|
||||||
set(obj2)!
|
set(obj2)!
|
||||||
|
install_action.done = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
mut other_actions := plbook.find(filter: 'zerodb.')!
|
mut other_actions := plbook.find(filter: 'zerodb.')!
|
||||||
for other_action in other_actions {
|
for mut other_action in other_actions {
|
||||||
if other_action.name in ['destroy', 'install', 'build'] {
|
if other_action.name in ['destroy', 'install', 'build'] {
|
||||||
mut p := other_action.params
|
mut p := other_action.params
|
||||||
reset := p.get_default_false('reset')
|
reset := p.get_default_false('reset')
|
||||||
@@ -163,6 +167,7 @@ pub fn play(mut plbook PlayBook) ! {
|
|||||||
zerodb_obj.restart()!
|
zerodb_obj.restart()!
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
other_action.done = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -178,19 +183,19 @@ fn startupmanager_get(cat startupmanager.StartupManagerType) !startupmanager.Sta
|
|||||||
// systemd
|
// systemd
|
||||||
match cat {
|
match cat {
|
||||||
.screen {
|
.screen {
|
||||||
console.print_debug('startupmanager: screen')
|
console.print_debug("installer: zerodb' startupmanager get screen")
|
||||||
return startupmanager.get(.screen)!
|
return startupmanager.get(.screen)!
|
||||||
}
|
}
|
||||||
.zinit {
|
.zinit {
|
||||||
console.print_debug('startupmanager: zinit')
|
console.print_debug("installer: zerodb' startupmanager get zinit")
|
||||||
return startupmanager.get(.zinit)!
|
return startupmanager.get(.zinit)!
|
||||||
}
|
}
|
||||||
.systemd {
|
.systemd {
|
||||||
console.print_debug('startupmanager: systemd')
|
console.print_debug("installer: zerodb' startupmanager get systemd")
|
||||||
return startupmanager.get(.systemd)!
|
return startupmanager.get(.systemd)!
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
console.print_debug('startupmanager: auto')
|
console.print_debug("installer: zerodb' startupmanager get auto")
|
||||||
return startupmanager.get(.auto)!
|
return startupmanager.get(.auto)!
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -206,7 +211,7 @@ pub fn (mut self ZeroDB) start() ! {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
console.print_header('zerodb start')
|
console.print_header('installer: zerodb start')
|
||||||
|
|
||||||
if !installed()! {
|
if !installed()! {
|
||||||
install()!
|
install()!
|
||||||
@@ -219,7 +224,7 @@ pub fn (mut self ZeroDB) start() ! {
|
|||||||
for zprocess in startupcmd()! {
|
for zprocess in startupcmd()! {
|
||||||
mut sm := startupmanager_get(zprocess.startuptype)!
|
mut sm := startupmanager_get(zprocess.startuptype)!
|
||||||
|
|
||||||
console.print_debug('starting zerodb with ${zprocess.startuptype}...')
|
console.print_debug('installer: zerodb starting with ${zprocess.startuptype}...')
|
||||||
|
|
||||||
sm.new(zprocess)!
|
sm.new(zprocess)!
|
||||||
|
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ pub fn play(mut plbook PlayBook) ! {
|
|||||||
return error("can't configure zerofs, because no configuration allowed for this installer.")
|
return error("can't configure zerofs, because no configuration allowed for this installer.")
|
||||||
}
|
}
|
||||||
mut other_actions := plbook.find(filter: 'zerofs.')!
|
mut other_actions := plbook.find(filter: 'zerofs.')!
|
||||||
for other_action in other_actions {
|
for mut other_action in other_actions {
|
||||||
if other_action.name in ['destroy', 'install', 'build'] {
|
if other_action.name in ['destroy', 'install', 'build'] {
|
||||||
mut p := other_action.params
|
mut p := other_action.params
|
||||||
reset := p.get_default_false('reset')
|
reset := p.get_default_false('reset')
|
||||||
@@ -68,6 +68,7 @@ pub fn play(mut plbook PlayBook) ! {
|
|||||||
zerofs_obj.restart()!
|
zerofs_obj.restart()!
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
other_action.done = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -83,19 +84,19 @@ fn startupmanager_get(cat startupmanager.StartupManagerType) !startupmanager.Sta
|
|||||||
// systemd
|
// systemd
|
||||||
match cat {
|
match cat {
|
||||||
.screen {
|
.screen {
|
||||||
console.print_debug('startupmanager: screen')
|
console.print_debug("installer: zerofs' startupmanager get screen")
|
||||||
return startupmanager.get(.screen)!
|
return startupmanager.get(.screen)!
|
||||||
}
|
}
|
||||||
.zinit {
|
.zinit {
|
||||||
console.print_debug('startupmanager: zinit')
|
console.print_debug("installer: zerofs' startupmanager get zinit")
|
||||||
return startupmanager.get(.zinit)!
|
return startupmanager.get(.zinit)!
|
||||||
}
|
}
|
||||||
.systemd {
|
.systemd {
|
||||||
console.print_debug('startupmanager: systemd')
|
console.print_debug("installer: zerofs' startupmanager get systemd")
|
||||||
return startupmanager.get(.systemd)!
|
return startupmanager.get(.systemd)!
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
console.print_debug('startupmanager: auto')
|
console.print_debug("installer: zerofs' startupmanager get auto")
|
||||||
return startupmanager.get(.auto)!
|
return startupmanager.get(.auto)!
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -106,7 +107,7 @@ pub fn (mut self ZeroFS) start() ! {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
console.print_header('zerofs start')
|
console.print_header('installer: zerofs start')
|
||||||
|
|
||||||
if !installed()! {
|
if !installed()! {
|
||||||
install()!
|
install()!
|
||||||
@@ -119,7 +120,7 @@ pub fn (mut self ZeroFS) start() ! {
|
|||||||
for zprocess in startupcmd()! {
|
for zprocess in startupcmd()! {
|
||||||
mut sm := startupmanager_get(zprocess.startuptype)!
|
mut sm := startupmanager_get(zprocess.startuptype)!
|
||||||
|
|
||||||
console.print_debug('starting zerofs with ${zprocess.startuptype}...')
|
console.print_debug('installer: zerofs starting with ${zprocess.startuptype}...')
|
||||||
|
|
||||||
sm.new(zprocess)!
|
sm.new(zprocess)!
|
||||||
|
|
||||||
|
|||||||
@@ -38,6 +38,7 @@ pub fn get(args ArgsGet) !&CoreDNS {
|
|||||||
if r.hexists('context:coredns', args.name)! {
|
if r.hexists('context:coredns', args.name)! {
|
||||||
data := r.hget('context:coredns', args.name)!
|
data := r.hget('context:coredns', args.name)!
|
||||||
if data.len == 0 {
|
if data.len == 0 {
|
||||||
|
print_backtrace()
|
||||||
return error('CoreDNS with name: coredns does not exist, prob bug.')
|
return error('CoreDNS with name: coredns does not exist, prob bug.')
|
||||||
}
|
}
|
||||||
mut obj := json.decode(CoreDNS, data)!
|
mut obj := json.decode(CoreDNS, data)!
|
||||||
@@ -46,12 +47,14 @@ pub fn get(args ArgsGet) !&CoreDNS {
|
|||||||
if args.create {
|
if args.create {
|
||||||
new(args)!
|
new(args)!
|
||||||
} else {
|
} else {
|
||||||
|
print_backtrace()
|
||||||
return error("CoreDNS with name 'coredns' does not exist")
|
return error("CoreDNS with name 'coredns' does not exist")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return get(name: args.name)! // no longer from db nor create
|
return get(name: args.name)! // no longer from db nor create
|
||||||
}
|
}
|
||||||
return coredns_global[args.name] or {
|
return coredns_global[args.name] or {
|
||||||
|
print_backtrace()
|
||||||
return error('could not get config for coredns with name:coredns')
|
return error('could not get config for coredns with name:coredns')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -124,14 +127,15 @@ pub fn play(mut plbook PlayBook) ! {
|
|||||||
}
|
}
|
||||||
mut install_actions := plbook.find(filter: 'coredns.configure')!
|
mut install_actions := plbook.find(filter: 'coredns.configure')!
|
||||||
if install_actions.len > 0 {
|
if install_actions.len > 0 {
|
||||||
for install_action in install_actions {
|
for mut install_action in install_actions {
|
||||||
heroscript := install_action.heroscript()
|
heroscript := install_action.heroscript()
|
||||||
mut obj2 := heroscript_loads(heroscript)!
|
mut obj2 := heroscript_loads(heroscript)!
|
||||||
set(obj2)!
|
set(obj2)!
|
||||||
|
install_action.done = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
mut other_actions := plbook.find(filter: 'coredns.')!
|
mut other_actions := plbook.find(filter: 'coredns.')!
|
||||||
for other_action in other_actions {
|
for mut other_action in other_actions {
|
||||||
if other_action.name in ['destroy', 'install', 'build'] {
|
if other_action.name in ['destroy', 'install', 'build'] {
|
||||||
mut p := other_action.params
|
mut p := other_action.params
|
||||||
reset := p.get_default_false('reset')
|
reset := p.get_default_false('reset')
|
||||||
@@ -163,6 +167,7 @@ pub fn play(mut plbook PlayBook) ! {
|
|||||||
coredns_obj.restart()!
|
coredns_obj.restart()!
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
other_action.done = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -178,19 +183,19 @@ fn startupmanager_get(cat startupmanager.StartupManagerType) !startupmanager.Sta
|
|||||||
// systemd
|
// systemd
|
||||||
match cat {
|
match cat {
|
||||||
.screen {
|
.screen {
|
||||||
console.print_debug('startupmanager: screen')
|
console.print_debug("installer: coredns' startupmanager get screen")
|
||||||
return startupmanager.get(.screen)!
|
return startupmanager.get(.screen)!
|
||||||
}
|
}
|
||||||
.zinit {
|
.zinit {
|
||||||
console.print_debug('startupmanager: zinit')
|
console.print_debug("installer: coredns' startupmanager get zinit")
|
||||||
return startupmanager.get(.zinit)!
|
return startupmanager.get(.zinit)!
|
||||||
}
|
}
|
||||||
.systemd {
|
.systemd {
|
||||||
console.print_debug('startupmanager: systemd')
|
console.print_debug("installer: coredns' startupmanager get systemd")
|
||||||
return startupmanager.get(.systemd)!
|
return startupmanager.get(.systemd)!
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
console.print_debug('startupmanager: auto')
|
console.print_debug("installer: coredns' startupmanager get auto")
|
||||||
return startupmanager.get(.auto)!
|
return startupmanager.get(.auto)!
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -206,7 +211,7 @@ pub fn (mut self CoreDNS) start() ! {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
console.print_header('coredns start')
|
console.print_header('installer: coredns start')
|
||||||
|
|
||||||
if !installed()! {
|
if !installed()! {
|
||||||
install()!
|
install()!
|
||||||
@@ -219,7 +224,7 @@ pub fn (mut self CoreDNS) start() ! {
|
|||||||
for zprocess in startupcmd()! {
|
for zprocess in startupcmd()! {
|
||||||
mut sm := startupmanager_get(zprocess.startuptype)!
|
mut sm := startupmanager_get(zprocess.startuptype)!
|
||||||
|
|
||||||
console.print_debug('starting coredns with ${zprocess.startuptype}...')
|
console.print_debug('installer: coredns starting with ${zprocess.startuptype}...')
|
||||||
|
|
||||||
sm.new(zprocess)!
|
sm.new(zprocess)!
|
||||||
|
|
||||||
|
|||||||
@@ -1,23 +0,0 @@
|
|||||||
module coredns
|
|
||||||
|
|
||||||
import freeflowuniverse.herolib.core.playbook { PlayBook }
|
|
||||||
import freeflowuniverse.herolib.ui.console
|
|
||||||
import freeflowuniverse.herolib.installers.infra.coredns { install }
|
|
||||||
|
|
||||||
pub fn play(mut plbook PlayBook) ! {
|
|
||||||
if !plbook.exists(filter: 'coredns.') {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
mut install_action := plbook.ensure_once(filter: 'coredns.install')!
|
|
||||||
mut p := install_action.params
|
|
||||||
|
|
||||||
mut args := InstallArgs{
|
|
||||||
reset: p.get_default_false('reset')
|
|
||||||
}
|
|
||||||
|
|
||||||
console.print_header('Executing coredns.install action')
|
|
||||||
install(args)!
|
|
||||||
|
|
||||||
install_action.done = true
|
|
||||||
}
|
|
||||||
@@ -38,6 +38,7 @@ pub fn get(args ArgsGet) !&GiteaServer {
|
|||||||
if r.hexists('context:gitea', args.name)! {
|
if r.hexists('context:gitea', args.name)! {
|
||||||
data := r.hget('context:gitea', args.name)!
|
data := r.hget('context:gitea', args.name)!
|
||||||
if data.len == 0 {
|
if data.len == 0 {
|
||||||
|
print_backtrace()
|
||||||
return error('GiteaServer with name: gitea does not exist, prob bug.')
|
return error('GiteaServer with name: gitea does not exist, prob bug.')
|
||||||
}
|
}
|
||||||
mut obj := json.decode(GiteaServer, data)!
|
mut obj := json.decode(GiteaServer, data)!
|
||||||
@@ -46,12 +47,14 @@ pub fn get(args ArgsGet) !&GiteaServer {
|
|||||||
if args.create {
|
if args.create {
|
||||||
new(args)!
|
new(args)!
|
||||||
} else {
|
} else {
|
||||||
|
print_backtrace()
|
||||||
return error("GiteaServer with name 'gitea' does not exist")
|
return error("GiteaServer with name 'gitea' does not exist")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return get(name: args.name)! // no longer from db nor create
|
return get(name: args.name)! // no longer from db nor create
|
||||||
}
|
}
|
||||||
return gitea_global[args.name] or {
|
return gitea_global[args.name] or {
|
||||||
|
print_backtrace()
|
||||||
return error('could not get config for gitea with name:gitea')
|
return error('could not get config for gitea with name:gitea')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -124,14 +127,15 @@ pub fn play(mut plbook PlayBook) ! {
|
|||||||
}
|
}
|
||||||
mut install_actions := plbook.find(filter: 'gitea.configure')!
|
mut install_actions := plbook.find(filter: 'gitea.configure')!
|
||||||
if install_actions.len > 0 {
|
if install_actions.len > 0 {
|
||||||
for install_action in install_actions {
|
for mut install_action in install_actions {
|
||||||
heroscript := install_action.heroscript()
|
heroscript := install_action.heroscript()
|
||||||
mut obj2 := heroscript_loads(heroscript)!
|
mut obj2 := heroscript_loads(heroscript)!
|
||||||
set(obj2)!
|
set(obj2)!
|
||||||
|
install_action.done = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
mut other_actions := plbook.find(filter: 'gitea.')!
|
mut other_actions := plbook.find(filter: 'gitea.')!
|
||||||
for other_action in other_actions {
|
for mut other_action in other_actions {
|
||||||
if other_action.name in ['destroy', 'install', 'build'] {
|
if other_action.name in ['destroy', 'install', 'build'] {
|
||||||
mut p := other_action.params
|
mut p := other_action.params
|
||||||
reset := p.get_default_false('reset')
|
reset := p.get_default_false('reset')
|
||||||
@@ -163,6 +167,7 @@ pub fn play(mut plbook PlayBook) ! {
|
|||||||
gitea_obj.restart()!
|
gitea_obj.restart()!
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
other_action.done = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -178,19 +183,19 @@ fn startupmanager_get(cat startupmanager.StartupManagerType) !startupmanager.Sta
|
|||||||
// systemd
|
// systemd
|
||||||
match cat {
|
match cat {
|
||||||
.screen {
|
.screen {
|
||||||
console.print_debug('startupmanager: screen')
|
console.print_debug("installer: gitea' startupmanager get screen")
|
||||||
return startupmanager.get(.screen)!
|
return startupmanager.get(.screen)!
|
||||||
}
|
}
|
||||||
.zinit {
|
.zinit {
|
||||||
console.print_debug('startupmanager: zinit')
|
console.print_debug("installer: gitea' startupmanager get zinit")
|
||||||
return startupmanager.get(.zinit)!
|
return startupmanager.get(.zinit)!
|
||||||
}
|
}
|
||||||
.systemd {
|
.systemd {
|
||||||
console.print_debug('startupmanager: systemd')
|
console.print_debug("installer: gitea' startupmanager get systemd")
|
||||||
return startupmanager.get(.systemd)!
|
return startupmanager.get(.systemd)!
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
console.print_debug('startupmanager: auto')
|
console.print_debug("installer: gitea' startupmanager get auto")
|
||||||
return startupmanager.get(.auto)!
|
return startupmanager.get(.auto)!
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -206,7 +211,7 @@ pub fn (mut self GiteaServer) start() ! {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
console.print_header('gitea start')
|
console.print_header('installer: gitea start')
|
||||||
|
|
||||||
if !installed()! {
|
if !installed()! {
|
||||||
install()!
|
install()!
|
||||||
@@ -219,7 +224,7 @@ pub fn (mut self GiteaServer) start() ! {
|
|||||||
for zprocess in startupcmd()! {
|
for zprocess in startupcmd()! {
|
||||||
mut sm := startupmanager_get(zprocess.startuptype)!
|
mut sm := startupmanager_get(zprocess.startuptype)!
|
||||||
|
|
||||||
console.print_debug('starting gitea with ${zprocess.startuptype}...')
|
console.print_debug('installer: gitea starting with ${zprocess.startuptype}...')
|
||||||
|
|
||||||
sm.new(zprocess)!
|
sm.new(zprocess)!
|
||||||
|
|
||||||
|
|||||||
@@ -135,19 +135,13 @@ fn install() ! {
|
|||||||
|
|
||||||
fn destroy() ! {
|
fn destroy() ! {
|
||||||
console.print_header('removing livekit')
|
console.print_header('removing livekit')
|
||||||
|
osal.process_kill_recursive(name: 'livekit') or {
|
||||||
|
return error('Could not kill livekit due to: ${err}')
|
||||||
|
}
|
||||||
res := os.execute('sudo rm -rf /usr/local/bin/livekit-server')
|
res := os.execute('sudo rm -rf /usr/local/bin/livekit-server')
|
||||||
if res.exit_code != 0 {
|
if res.exit_code != 0 {
|
||||||
return error('Failed to remove LiveKit server')
|
return error('Failed to remove LiveKit server')
|
||||||
}
|
}
|
||||||
|
|
||||||
mut zinit_factory := zinit.new()!
|
|
||||||
if zinit_factory.exists('livekit') {
|
|
||||||
zinit_factory.stop('livekit') or {
|
|
||||||
return error('Could not stop livekit service due to: ${err}')
|
|
||||||
}
|
|
||||||
zinit_factory.delete('livekit') or {
|
|
||||||
return error('Could not delete livekit service due to: ${err}')
|
|
||||||
}
|
|
||||||
}
|
|
||||||
console.print_header('livekit removed')
|
console.print_header('livekit removed')
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -38,6 +38,7 @@ pub fn get(args ArgsGet) !&LivekitServer {
|
|||||||
if r.hexists('context:livekit', args.name)! {
|
if r.hexists('context:livekit', args.name)! {
|
||||||
data := r.hget('context:livekit', args.name)!
|
data := r.hget('context:livekit', args.name)!
|
||||||
if data.len == 0 {
|
if data.len == 0 {
|
||||||
|
print_backtrace()
|
||||||
return error('LivekitServer with name: livekit does not exist, prob bug.')
|
return error('LivekitServer with name: livekit does not exist, prob bug.')
|
||||||
}
|
}
|
||||||
mut obj := json.decode(LivekitServer, data)!
|
mut obj := json.decode(LivekitServer, data)!
|
||||||
@@ -46,12 +47,14 @@ pub fn get(args ArgsGet) !&LivekitServer {
|
|||||||
if args.create {
|
if args.create {
|
||||||
new(args)!
|
new(args)!
|
||||||
} else {
|
} else {
|
||||||
|
print_backtrace()
|
||||||
return error("LivekitServer with name 'livekit' does not exist")
|
return error("LivekitServer with name 'livekit' does not exist")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return get(name: args.name)! // no longer from db nor create
|
return get(name: args.name)! // no longer from db nor create
|
||||||
}
|
}
|
||||||
return livekit_global[args.name] or {
|
return livekit_global[args.name] or {
|
||||||
|
print_backtrace()
|
||||||
return error('could not get config for livekit with name:livekit')
|
return error('could not get config for livekit with name:livekit')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -124,14 +127,15 @@ pub fn play(mut plbook PlayBook) ! {
|
|||||||
}
|
}
|
||||||
mut install_actions := plbook.find(filter: 'livekit.configure')!
|
mut install_actions := plbook.find(filter: 'livekit.configure')!
|
||||||
if install_actions.len > 0 {
|
if install_actions.len > 0 {
|
||||||
for install_action in install_actions {
|
for mut install_action in install_actions {
|
||||||
heroscript := install_action.heroscript()
|
heroscript := install_action.heroscript()
|
||||||
mut obj2 := heroscript_loads(heroscript)!
|
mut obj2 := heroscript_loads(heroscript)!
|
||||||
set(obj2)!
|
set(obj2)!
|
||||||
|
install_action.done = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
mut other_actions := plbook.find(filter: 'livekit.')!
|
mut other_actions := plbook.find(filter: 'livekit.')!
|
||||||
for other_action in other_actions {
|
for mut other_action in other_actions {
|
||||||
if other_action.name in ['destroy', 'install', 'build'] {
|
if other_action.name in ['destroy', 'install', 'build'] {
|
||||||
mut p := other_action.params
|
mut p := other_action.params
|
||||||
reset := p.get_default_false('reset')
|
reset := p.get_default_false('reset')
|
||||||
@@ -163,6 +167,7 @@ pub fn play(mut plbook PlayBook) ! {
|
|||||||
livekit_obj.restart()!
|
livekit_obj.restart()!
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
other_action.done = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -178,19 +183,19 @@ fn startupmanager_get(cat startupmanager.StartupManagerType) !startupmanager.Sta
|
|||||||
// systemd
|
// systemd
|
||||||
match cat {
|
match cat {
|
||||||
.screen {
|
.screen {
|
||||||
console.print_debug('startupmanager: screen')
|
console.print_debug("installer: livekit' startupmanager get screen")
|
||||||
return startupmanager.get(.screen)!
|
return startupmanager.get(.screen)!
|
||||||
}
|
}
|
||||||
.zinit {
|
.zinit {
|
||||||
console.print_debug('startupmanager: zinit')
|
console.print_debug("installer: livekit' startupmanager get zinit")
|
||||||
return startupmanager.get(.zinit)!
|
return startupmanager.get(.zinit)!
|
||||||
}
|
}
|
||||||
.systemd {
|
.systemd {
|
||||||
console.print_debug('startupmanager: systemd')
|
console.print_debug("installer: livekit' startupmanager get systemd")
|
||||||
return startupmanager.get(.systemd)!
|
return startupmanager.get(.systemd)!
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
console.print_debug('startupmanager: auto')
|
console.print_debug("installer: livekit' startupmanager get auto")
|
||||||
return startupmanager.get(.auto)!
|
return startupmanager.get(.auto)!
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -208,7 +213,7 @@ pub fn (mut self LivekitServer) start() ! {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
console.print_header('livekit start')
|
console.print_header('installer: livekit start')
|
||||||
|
|
||||||
if !installed()! {
|
if !installed()! {
|
||||||
install()!
|
install()!
|
||||||
@@ -221,7 +226,7 @@ pub fn (mut self LivekitServer) start() ! {
|
|||||||
for zprocess in startupcmd()! {
|
for zprocess in startupcmd()! {
|
||||||
mut sm := startupmanager_get(zprocess.startuptype)!
|
mut sm := startupmanager_get(zprocess.startuptype)!
|
||||||
|
|
||||||
console.print_debug('starting livekit with ${zprocess.startuptype}...')
|
console.print_debug('installer: livekit starting with ${zprocess.startuptype}...')
|
||||||
|
|
||||||
sm.new(zprocess)!
|
sm.new(zprocess)!
|
||||||
|
|
||||||
|
|||||||
@@ -1,23 +0,0 @@
|
|||||||
module livekit
|
|
||||||
|
|
||||||
import freeflowuniverse.herolib.core.playbook { PlayBook }
|
|
||||||
import freeflowuniverse.herolib.ui.console
|
|
||||||
import freeflowuniverse.herolib.installers.infra.livekit { install }
|
|
||||||
|
|
||||||
pub fn play(mut plbook PlayBook) ! {
|
|
||||||
if !plbook.exists(filter: 'livekit.') {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
mut install_action := plbook.ensure_once(filter: 'livekit.install')!
|
|
||||||
mut p := install_action.params
|
|
||||||
|
|
||||||
mut args := InstallArgs{
|
|
||||||
reset: p.get_default_false('reset')
|
|
||||||
}
|
|
||||||
|
|
||||||
console.print_header('Executing livekit.install action')
|
|
||||||
install(args)!
|
|
||||||
|
|
||||||
install_action.done = true
|
|
||||||
}
|
|
||||||
@@ -1,23 +0,0 @@
|
|||||||
module zinit_installer
|
|
||||||
|
|
||||||
import freeflowuniverse.herolib.core.playbook { PlayBook }
|
|
||||||
import freeflowuniverse.herolib.ui.console
|
|
||||||
import freeflowuniverse.herolib.installers.infra.zinit_installer { install }
|
|
||||||
|
|
||||||
pub fn play(mut plbook PlayBook) ! {
|
|
||||||
if !plbook.exists(filter: 'zinit_installer.') {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
mut install_action := plbook.ensure_once(filter: 'zinit_installer.install')!
|
|
||||||
mut p := install_action.params
|
|
||||||
|
|
||||||
mut args := InstallArgs{
|
|
||||||
reset: p.get_default_false('reset')
|
|
||||||
}
|
|
||||||
|
|
||||||
console.print_header('Executing zinit_installer.install action')
|
|
||||||
install(args)!
|
|
||||||
|
|
||||||
install_action.done = true
|
|
||||||
}
|
|
||||||
@@ -16,7 +16,7 @@ fn startupcmd() ![]startupmanager.ZProcessNewArgs {
|
|||||||
if core.is_linux()! {
|
if core.is_linux()! {
|
||||||
res << startupmanager.ZProcessNewArgs{
|
res << startupmanager.ZProcessNewArgs{
|
||||||
name: 'zinit'
|
name: 'zinit'
|
||||||
cmd: '/usr/local/bin/zinit init ${os.home_dir()}/hero/cfg/zinit'
|
cmd: '/usr/local/bin/zinit init -c ${os.home_dir()}/hero/cfg/zinit'
|
||||||
startuptype: .systemd
|
startuptype: .systemd
|
||||||
start: true
|
start: true
|
||||||
restart: true
|
restart: true
|
||||||
@@ -24,7 +24,7 @@ fn startupcmd() ![]startupmanager.ZProcessNewArgs {
|
|||||||
} else {
|
} else {
|
||||||
res << startupmanager.ZProcessNewArgs{
|
res << startupmanager.ZProcessNewArgs{
|
||||||
name: 'zinit'
|
name: 'zinit'
|
||||||
cmd: '${os.home_dir()}/hero/bin/zinit init --config ${os.home_dir()}/hero/cfg/zinit'
|
cmd: '${os.home_dir()}/hero/bin/zinit init -c ${os.home_dir()}/hero/cfg/zinit'
|
||||||
startuptype: .screen
|
startuptype: .screen
|
||||||
start: true
|
start: true
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ pub fn play(mut plbook PlayBook) ! {
|
|||||||
return error("can't configure zinit_installer, because no configuration allowed for this installer.")
|
return error("can't configure zinit_installer, because no configuration allowed for this installer.")
|
||||||
}
|
}
|
||||||
mut other_actions := plbook.find(filter: 'zinit_installer.')!
|
mut other_actions := plbook.find(filter: 'zinit_installer.')!
|
||||||
for other_action in other_actions {
|
for mut other_action in other_actions {
|
||||||
if other_action.name in ['destroy', 'install', 'build'] {
|
if other_action.name in ['destroy', 'install', 'build'] {
|
||||||
mut p := other_action.params
|
mut p := other_action.params
|
||||||
reset := p.get_default_false('reset')
|
reset := p.get_default_false('reset')
|
||||||
@@ -68,6 +68,7 @@ pub fn play(mut plbook PlayBook) ! {
|
|||||||
zinit_installer_obj.restart()!
|
zinit_installer_obj.restart()!
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
other_action.done = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -83,19 +84,19 @@ fn startupmanager_get(cat startupmanager.StartupManagerType) !startupmanager.Sta
|
|||||||
// systemd
|
// systemd
|
||||||
match cat {
|
match cat {
|
||||||
.screen {
|
.screen {
|
||||||
console.print_debug('startupmanager: screen')
|
console.print_debug("installer: zinit_installer' startupmanager get screen")
|
||||||
return startupmanager.get(.screen)!
|
return startupmanager.get(.screen)!
|
||||||
}
|
}
|
||||||
.zinit {
|
.zinit {
|
||||||
console.print_debug('startupmanager: zinit')
|
console.print_debug("installer: zinit_installer' startupmanager get zinit")
|
||||||
return startupmanager.get(.zinit)!
|
return startupmanager.get(.zinit)!
|
||||||
}
|
}
|
||||||
.systemd {
|
.systemd {
|
||||||
console.print_debug('startupmanager: systemd')
|
console.print_debug("installer: zinit_installer' startupmanager get systemd")
|
||||||
return startupmanager.get(.systemd)!
|
return startupmanager.get(.systemd)!
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
console.print_debug('startupmanager: auto')
|
console.print_debug("installer: zinit_installer' startupmanager get auto")
|
||||||
return startupmanager.get(.auto)!
|
return startupmanager.get(.auto)!
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -106,7 +107,7 @@ pub fn (mut self ZinitInstaller) start() ! {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
console.print_header('zinit_installer start')
|
console.print_header('installer: zinit_installer start')
|
||||||
|
|
||||||
if !installed()! {
|
if !installed()! {
|
||||||
install()!
|
install()!
|
||||||
@@ -119,7 +120,7 @@ pub fn (mut self ZinitInstaller) start() ! {
|
|||||||
for zprocess in startupcmd()! {
|
for zprocess in startupcmd()! {
|
||||||
mut sm := startupmanager_get(zprocess.startuptype)!
|
mut sm := startupmanager_get(zprocess.startuptype)!
|
||||||
|
|
||||||
console.print_debug('starting zinit_installer with ${zprocess.startuptype}...')
|
console.print_debug('installer: zinit_installer starting with ${zprocess.startuptype}...')
|
||||||
|
|
||||||
sm.new(zprocess)!
|
sm.new(zprocess)!
|
||||||
|
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ pub fn play(mut plbook PlayBook) ! {
|
|||||||
return error("can't configure golang, because no configuration allowed for this installer.")
|
return error("can't configure golang, because no configuration allowed for this installer.")
|
||||||
}
|
}
|
||||||
mut other_actions := plbook.find(filter: 'golang.')!
|
mut other_actions := plbook.find(filter: 'golang.')!
|
||||||
for other_action in other_actions {
|
for mut other_action in other_actions {
|
||||||
if other_action.name in ['destroy', 'install', 'build'] {
|
if other_action.name in ['destroy', 'install', 'build'] {
|
||||||
mut p := other_action.params
|
mut p := other_action.params
|
||||||
reset := p.get_default_false('reset')
|
reset := p.get_default_false('reset')
|
||||||
@@ -48,6 +48,7 @@ pub fn play(mut plbook PlayBook) ! {
|
|||||||
install()!
|
install()!
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
other_action.done = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ pub fn play(mut plbook PlayBook) ! {
|
|||||||
return error("can't configure nodejs, because no configuration allowed for this installer.")
|
return error("can't configure nodejs, because no configuration allowed for this installer.")
|
||||||
}
|
}
|
||||||
mut other_actions := plbook.find(filter: 'nodejs.')!
|
mut other_actions := plbook.find(filter: 'nodejs.')!
|
||||||
for other_action in other_actions {
|
for mut other_action in other_actions {
|
||||||
if other_action.name in ['destroy', 'install', 'build'] {
|
if other_action.name in ['destroy', 'install', 'build'] {
|
||||||
mut p := other_action.params
|
mut p := other_action.params
|
||||||
reset := p.get_default_false('reset')
|
reset := p.get_default_false('reset')
|
||||||
@@ -48,6 +48,7 @@ pub fn play(mut plbook PlayBook) ! {
|
|||||||
install()!
|
install()!
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
other_action.done = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ pub fn play(mut plbook PlayBook) ! {
|
|||||||
return error("can't configure python, because no configuration allowed for this installer.")
|
return error("can't configure python, because no configuration allowed for this installer.")
|
||||||
}
|
}
|
||||||
mut other_actions := plbook.find(filter: 'python.')!
|
mut other_actions := plbook.find(filter: 'python.')!
|
||||||
for other_action in other_actions {
|
for mut other_action in other_actions {
|
||||||
if other_action.name in ['destroy', 'install', 'build'] {
|
if other_action.name in ['destroy', 'install', 'build'] {
|
||||||
mut p := other_action.params
|
mut p := other_action.params
|
||||||
reset := p.get_default_false('reset')
|
reset := p.get_default_false('reset')
|
||||||
@@ -48,6 +48,7 @@ pub fn play(mut plbook PlayBook) ! {
|
|||||||
install()!
|
install()!
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
other_action.done = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ pub fn play(mut plbook PlayBook) ! {
|
|||||||
return error("can't configure rust, because no configuration allowed for this installer.")
|
return error("can't configure rust, because no configuration allowed for this installer.")
|
||||||
}
|
}
|
||||||
mut other_actions := plbook.find(filter: 'rust.')!
|
mut other_actions := plbook.find(filter: 'rust.')!
|
||||||
for other_action in other_actions {
|
for mut other_action in other_actions {
|
||||||
if other_action.name in ['destroy', 'install', 'build'] {
|
if other_action.name in ['destroy', 'install', 'build'] {
|
||||||
mut p := other_action.params
|
mut p := other_action.params
|
||||||
reset := p.get_default_false('reset')
|
reset := p.get_default_false('reset')
|
||||||
@@ -48,6 +48,7 @@ pub fn play(mut plbook PlayBook) ! {
|
|||||||
install()!
|
install()!
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
other_action.done = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -38,6 +38,7 @@ pub fn get(args ArgsGet) !&MyceliumInstaller {
|
|||||||
if r.hexists('context:mycelium_installer', args.name)! {
|
if r.hexists('context:mycelium_installer', args.name)! {
|
||||||
data := r.hget('context:mycelium_installer', args.name)!
|
data := r.hget('context:mycelium_installer', args.name)!
|
||||||
if data.len == 0 {
|
if data.len == 0 {
|
||||||
|
print_backtrace()
|
||||||
return error('MyceliumInstaller with name: mycelium_installer does not exist, prob bug.')
|
return error('MyceliumInstaller with name: mycelium_installer does not exist, prob bug.')
|
||||||
}
|
}
|
||||||
mut obj := json.decode(MyceliumInstaller, data)!
|
mut obj := json.decode(MyceliumInstaller, data)!
|
||||||
@@ -46,12 +47,14 @@ pub fn get(args ArgsGet) !&MyceliumInstaller {
|
|||||||
if args.create {
|
if args.create {
|
||||||
new(args)!
|
new(args)!
|
||||||
} else {
|
} else {
|
||||||
|
print_backtrace()
|
||||||
return error("MyceliumInstaller with name 'mycelium_installer' does not exist")
|
return error("MyceliumInstaller with name 'mycelium_installer' does not exist")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return get(name: args.name)! // no longer from db nor create
|
return get(name: args.name)! // no longer from db nor create
|
||||||
}
|
}
|
||||||
return mycelium_installer_global[args.name] or {
|
return mycelium_installer_global[args.name] or {
|
||||||
|
print_backtrace()
|
||||||
return error('could not get config for mycelium_installer with name:mycelium_installer')
|
return error('could not get config for mycelium_installer with name:mycelium_installer')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -124,14 +127,15 @@ pub fn play(mut plbook PlayBook) ! {
|
|||||||
}
|
}
|
||||||
mut install_actions := plbook.find(filter: 'mycelium_installer.configure')!
|
mut install_actions := plbook.find(filter: 'mycelium_installer.configure')!
|
||||||
if install_actions.len > 0 {
|
if install_actions.len > 0 {
|
||||||
for install_action in install_actions {
|
for mut install_action in install_actions {
|
||||||
heroscript := install_action.heroscript()
|
heroscript := install_action.heroscript()
|
||||||
mut obj2 := heroscript_loads(heroscript)!
|
mut obj2 := heroscript_loads(heroscript)!
|
||||||
set(obj2)!
|
set(obj2)!
|
||||||
|
install_action.done = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
mut other_actions := plbook.find(filter: 'mycelium_installer.')!
|
mut other_actions := plbook.find(filter: 'mycelium_installer.')!
|
||||||
for other_action in other_actions {
|
for mut other_action in other_actions {
|
||||||
if other_action.name in ['destroy', 'install', 'build'] {
|
if other_action.name in ['destroy', 'install', 'build'] {
|
||||||
mut p := other_action.params
|
mut p := other_action.params
|
||||||
reset := p.get_default_false('reset')
|
reset := p.get_default_false('reset')
|
||||||
@@ -163,6 +167,7 @@ pub fn play(mut plbook PlayBook) ! {
|
|||||||
mycelium_installer_obj.restart()!
|
mycelium_installer_obj.restart()!
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
other_action.done = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -178,19 +183,19 @@ fn startupmanager_get(cat startupmanager.StartupManagerType) !startupmanager.Sta
|
|||||||
// systemd
|
// systemd
|
||||||
match cat {
|
match cat {
|
||||||
.screen {
|
.screen {
|
||||||
console.print_debug('startupmanager: screen')
|
console.print_debug("installer: mycelium_installer' startupmanager get screen")
|
||||||
return startupmanager.get(.screen)!
|
return startupmanager.get(.screen)!
|
||||||
}
|
}
|
||||||
.zinit {
|
.zinit {
|
||||||
console.print_debug('startupmanager: zinit')
|
console.print_debug("installer: mycelium_installer' startupmanager get zinit")
|
||||||
return startupmanager.get(.zinit)!
|
return startupmanager.get(.zinit)!
|
||||||
}
|
}
|
||||||
.systemd {
|
.systemd {
|
||||||
console.print_debug('startupmanager: systemd')
|
console.print_debug("installer: mycelium_installer' startupmanager get systemd")
|
||||||
return startupmanager.get(.systemd)!
|
return startupmanager.get(.systemd)!
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
console.print_debug('startupmanager: auto')
|
console.print_debug("installer: mycelium_installer' startupmanager get auto")
|
||||||
return startupmanager.get(.auto)!
|
return startupmanager.get(.auto)!
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -208,7 +213,7 @@ pub fn (mut self MyceliumInstaller) start() ! {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
console.print_header('mycelium_installer start')
|
console.print_header('installer: mycelium_installer start')
|
||||||
|
|
||||||
if !installed()! {
|
if !installed()! {
|
||||||
install()!
|
install()!
|
||||||
@@ -221,7 +226,7 @@ pub fn (mut self MyceliumInstaller) start() ! {
|
|||||||
for zprocess in startupcmd()! {
|
for zprocess in startupcmd()! {
|
||||||
mut sm := startupmanager_get(zprocess.startuptype)!
|
mut sm := startupmanager_get(zprocess.startuptype)!
|
||||||
|
|
||||||
console.print_debug('starting mycelium_installer with ${zprocess.startuptype}...')
|
console.print_debug('installer: mycelium_installer starting with ${zprocess.startuptype}...')
|
||||||
|
|
||||||
sm.new(zprocess)!
|
sm.new(zprocess)!
|
||||||
|
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ pub fn play(mut plbook PlayBook) ! {
|
|||||||
return error("can't configure wireguard_installer, because no configuration allowed for this installer.")
|
return error("can't configure wireguard_installer, because no configuration allowed for this installer.")
|
||||||
}
|
}
|
||||||
mut other_actions := plbook.find(filter: 'wireguard_installer.')!
|
mut other_actions := plbook.find(filter: 'wireguard_installer.')!
|
||||||
for other_action in other_actions {
|
for mut other_action in other_actions {
|
||||||
if other_action.name in ['destroy', 'install', 'build'] {
|
if other_action.name in ['destroy', 'install', 'build'] {
|
||||||
mut p := other_action.params
|
mut p := other_action.params
|
||||||
reset := p.get_default_false('reset')
|
reset := p.get_default_false('reset')
|
||||||
@@ -48,6 +48,7 @@ pub fn play(mut plbook PlayBook) ! {
|
|||||||
install()!
|
install()!
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
other_action.done = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ pub fn play(mut plbook PlayBook) ! {
|
|||||||
return error("can't configure yggdrasil, because no configuration allowed for this installer.")
|
return error("can't configure yggdrasil, because no configuration allowed for this installer.")
|
||||||
}
|
}
|
||||||
mut other_actions := plbook.find(filter: 'yggdrasil.')!
|
mut other_actions := plbook.find(filter: 'yggdrasil.')!
|
||||||
for other_action in other_actions {
|
for mut other_action in other_actions {
|
||||||
if other_action.name in ['destroy', 'install', 'build'] {
|
if other_action.name in ['destroy', 'install', 'build'] {
|
||||||
mut p := other_action.params
|
mut p := other_action.params
|
||||||
reset := p.get_default_false('reset')
|
reset := p.get_default_false('reset')
|
||||||
@@ -68,6 +68,7 @@ pub fn play(mut plbook PlayBook) ! {
|
|||||||
yggdrasil_obj.restart()!
|
yggdrasil_obj.restart()!
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
other_action.done = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -83,19 +84,19 @@ fn startupmanager_get(cat startupmanager.StartupManagerType) !startupmanager.Sta
|
|||||||
// systemd
|
// systemd
|
||||||
match cat {
|
match cat {
|
||||||
.screen {
|
.screen {
|
||||||
console.print_debug('startupmanager: screen')
|
console.print_debug("installer: yggdrasil' startupmanager get screen")
|
||||||
return startupmanager.get(.screen)!
|
return startupmanager.get(.screen)!
|
||||||
}
|
}
|
||||||
.zinit {
|
.zinit {
|
||||||
console.print_debug('startupmanager: zinit')
|
console.print_debug("installer: yggdrasil' startupmanager get zinit")
|
||||||
return startupmanager.get(.zinit)!
|
return startupmanager.get(.zinit)!
|
||||||
}
|
}
|
||||||
.systemd {
|
.systemd {
|
||||||
console.print_debug('startupmanager: systemd')
|
console.print_debug("installer: yggdrasil' startupmanager get systemd")
|
||||||
return startupmanager.get(.systemd)!
|
return startupmanager.get(.systemd)!
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
console.print_debug('startupmanager: auto')
|
console.print_debug("installer: yggdrasil' startupmanager get auto")
|
||||||
return startupmanager.get(.auto)!
|
return startupmanager.get(.auto)!
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -106,7 +107,7 @@ pub fn (mut self YggdrasilInstaller) start() ! {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
console.print_header('yggdrasil start')
|
console.print_header('installer: yggdrasil start')
|
||||||
|
|
||||||
if !installed()! {
|
if !installed()! {
|
||||||
install()!
|
install()!
|
||||||
@@ -119,7 +120,7 @@ pub fn (mut self YggdrasilInstaller) start() ! {
|
|||||||
for zprocess in startupcmd()! {
|
for zprocess in startupcmd()! {
|
||||||
mut sm := startupmanager_get(zprocess.startuptype)!
|
mut sm := startupmanager_get(zprocess.startuptype)!
|
||||||
|
|
||||||
console.print_debug('starting yggdrasil with ${zprocess.startuptype}...')
|
console.print_debug('installer: yggdrasil starting with ${zprocess.startuptype}...')
|
||||||
|
|
||||||
sm.new(zprocess)!
|
sm.new(zprocess)!
|
||||||
|
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ pub fn play(mut plbook PlayBook) ! {
|
|||||||
return error("can't configure actrunner, because no configuration allowed for this installer.")
|
return error("can't configure actrunner, because no configuration allowed for this installer.")
|
||||||
}
|
}
|
||||||
mut other_actions := plbook.find(filter: 'actrunner.')!
|
mut other_actions := plbook.find(filter: 'actrunner.')!
|
||||||
for other_action in other_actions {
|
for mut other_action in other_actions {
|
||||||
if other_action.name in ['destroy', 'install', 'build'] {
|
if other_action.name in ['destroy', 'install', 'build'] {
|
||||||
mut p := other_action.params
|
mut p := other_action.params
|
||||||
reset := p.get_default_false('reset')
|
reset := p.get_default_false('reset')
|
||||||
@@ -68,6 +68,7 @@ pub fn play(mut plbook PlayBook) ! {
|
|||||||
actrunner_obj.restart()!
|
actrunner_obj.restart()!
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
other_action.done = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -83,19 +84,19 @@ fn startupmanager_get(cat startupmanager.StartupManagerType) !startupmanager.Sta
|
|||||||
// systemd
|
// systemd
|
||||||
match cat {
|
match cat {
|
||||||
.screen {
|
.screen {
|
||||||
console.print_debug('startupmanager: screen')
|
console.print_debug("installer: actrunner' startupmanager get screen")
|
||||||
return startupmanager.get(.screen)!
|
return startupmanager.get(.screen)!
|
||||||
}
|
}
|
||||||
.zinit {
|
.zinit {
|
||||||
console.print_debug('startupmanager: zinit')
|
console.print_debug("installer: actrunner' startupmanager get zinit")
|
||||||
return startupmanager.get(.zinit)!
|
return startupmanager.get(.zinit)!
|
||||||
}
|
}
|
||||||
.systemd {
|
.systemd {
|
||||||
console.print_debug('startupmanager: systemd')
|
console.print_debug("installer: actrunner' startupmanager get systemd")
|
||||||
return startupmanager.get(.systemd)!
|
return startupmanager.get(.systemd)!
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
console.print_debug('startupmanager: auto')
|
console.print_debug("installer: actrunner' startupmanager get auto")
|
||||||
return startupmanager.get(.auto)!
|
return startupmanager.get(.auto)!
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -106,7 +107,7 @@ pub fn (mut self ActRunner) start() ! {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
console.print_header('actrunner start')
|
console.print_header('installer: actrunner start')
|
||||||
|
|
||||||
if !installed()! {
|
if !installed()! {
|
||||||
install()!
|
install()!
|
||||||
@@ -119,7 +120,7 @@ pub fn (mut self ActRunner) start() ! {
|
|||||||
for zprocess in startupcmd()! {
|
for zprocess in startupcmd()! {
|
||||||
mut sm := startupmanager_get(zprocess.startuptype)!
|
mut sm := startupmanager_get(zprocess.startuptype)!
|
||||||
|
|
||||||
console.print_debug('starting actrunner with ${zprocess.startuptype}...')
|
console.print_debug('installer: actrunner starting with ${zprocess.startuptype}...')
|
||||||
|
|
||||||
sm.new(zprocess)!
|
sm.new(zprocess)!
|
||||||
|
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ pub fn play(mut plbook PlayBook) ! {
|
|||||||
return error("can't configure b2, because no configuration allowed for this installer.")
|
return error("can't configure b2, because no configuration allowed for this installer.")
|
||||||
}
|
}
|
||||||
mut other_actions := plbook.find(filter: 'b2.')!
|
mut other_actions := plbook.find(filter: 'b2.')!
|
||||||
for other_action in other_actions {
|
for mut other_action in other_actions {
|
||||||
if other_action.name in ['destroy', 'install', 'build'] {
|
if other_action.name in ['destroy', 'install', 'build'] {
|
||||||
mut p := other_action.params
|
mut p := other_action.params
|
||||||
reset := p.get_default_false('reset')
|
reset := p.get_default_false('reset')
|
||||||
@@ -48,6 +48,7 @@ pub fn play(mut plbook PlayBook) ! {
|
|||||||
install()!
|
install()!
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
other_action.done = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ pub fn play(mut plbook PlayBook) ! {
|
|||||||
return error("can't configure fungistor, because no configuration allowed for this installer.")
|
return error("can't configure fungistor, because no configuration allowed for this installer.")
|
||||||
}
|
}
|
||||||
mut other_actions := plbook.find(filter: 'fungistor.')!
|
mut other_actions := plbook.find(filter: 'fungistor.')!
|
||||||
for other_action in other_actions {
|
for mut other_action in other_actions {
|
||||||
if other_action.name in ['destroy', 'install', 'build'] {
|
if other_action.name in ['destroy', 'install', 'build'] {
|
||||||
mut p := other_action.params
|
mut p := other_action.params
|
||||||
reset := p.get_default_false('reset')
|
reset := p.get_default_false('reset')
|
||||||
@@ -68,6 +68,7 @@ pub fn play(mut plbook PlayBook) ! {
|
|||||||
fungistor_obj.restart()!
|
fungistor_obj.restart()!
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
other_action.done = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -83,19 +84,19 @@ fn startupmanager_get(cat startupmanager.StartupManagerType) !startupmanager.Sta
|
|||||||
// systemd
|
// systemd
|
||||||
match cat {
|
match cat {
|
||||||
.screen {
|
.screen {
|
||||||
console.print_debug('startupmanager: screen')
|
console.print_debug("installer: fungistor' startupmanager get screen")
|
||||||
return startupmanager.get(.screen)!
|
return startupmanager.get(.screen)!
|
||||||
}
|
}
|
||||||
.zinit {
|
.zinit {
|
||||||
console.print_debug('startupmanager: zinit')
|
console.print_debug("installer: fungistor' startupmanager get zinit")
|
||||||
return startupmanager.get(.zinit)!
|
return startupmanager.get(.zinit)!
|
||||||
}
|
}
|
||||||
.systemd {
|
.systemd {
|
||||||
console.print_debug('startupmanager: systemd')
|
console.print_debug("installer: fungistor' startupmanager get systemd")
|
||||||
return startupmanager.get(.systemd)!
|
return startupmanager.get(.systemd)!
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
console.print_debug('startupmanager: auto')
|
console.print_debug("installer: fungistor' startupmanager get auto")
|
||||||
return startupmanager.get(.auto)!
|
return startupmanager.get(.auto)!
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -106,7 +107,7 @@ pub fn (mut self FungiStor) start() ! {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
console.print_header('fungistor start')
|
console.print_header('installer: fungistor start')
|
||||||
|
|
||||||
if !installed()! {
|
if !installed()! {
|
||||||
install()!
|
install()!
|
||||||
@@ -119,7 +120,7 @@ pub fn (mut self FungiStor) start() ! {
|
|||||||
for zprocess in startupcmd()! {
|
for zprocess in startupcmd()! {
|
||||||
mut sm := startupmanager_get(zprocess.startuptype)!
|
mut sm := startupmanager_get(zprocess.startuptype)!
|
||||||
|
|
||||||
console.print_debug('starting fungistor with ${zprocess.startuptype}...')
|
console.print_debug('installer: fungistor starting with ${zprocess.startuptype}...')
|
||||||
|
|
||||||
sm.new(zprocess)!
|
sm.new(zprocess)!
|
||||||
|
|
||||||
|
|||||||
@@ -38,6 +38,7 @@ pub fn get(args ArgsGet) !&GarageS3 {
|
|||||||
if r.hexists('context:garage_s3', args.name)! {
|
if r.hexists('context:garage_s3', args.name)! {
|
||||||
data := r.hget('context:garage_s3', args.name)!
|
data := r.hget('context:garage_s3', args.name)!
|
||||||
if data.len == 0 {
|
if data.len == 0 {
|
||||||
|
print_backtrace()
|
||||||
return error('GarageS3 with name: garage_s3 does not exist, prob bug.')
|
return error('GarageS3 with name: garage_s3 does not exist, prob bug.')
|
||||||
}
|
}
|
||||||
mut obj := json.decode(GarageS3, data)!
|
mut obj := json.decode(GarageS3, data)!
|
||||||
@@ -46,12 +47,14 @@ pub fn get(args ArgsGet) !&GarageS3 {
|
|||||||
if args.create {
|
if args.create {
|
||||||
new(args)!
|
new(args)!
|
||||||
} else {
|
} else {
|
||||||
|
print_backtrace()
|
||||||
return error("GarageS3 with name 'garage_s3' does not exist")
|
return error("GarageS3 with name 'garage_s3' does not exist")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return get(name: args.name)! // no longer from db nor create
|
return get(name: args.name)! // no longer from db nor create
|
||||||
}
|
}
|
||||||
return garage_s3_global[args.name] or {
|
return garage_s3_global[args.name] or {
|
||||||
|
print_backtrace()
|
||||||
return error('could not get config for garage_s3 with name:garage_s3')
|
return error('could not get config for garage_s3 with name:garage_s3')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -124,14 +127,15 @@ pub fn play(mut plbook PlayBook) ! {
|
|||||||
}
|
}
|
||||||
mut install_actions := plbook.find(filter: 'garage_s3.configure')!
|
mut install_actions := plbook.find(filter: 'garage_s3.configure')!
|
||||||
if install_actions.len > 0 {
|
if install_actions.len > 0 {
|
||||||
for install_action in install_actions {
|
for mut install_action in install_actions {
|
||||||
heroscript := install_action.heroscript()
|
heroscript := install_action.heroscript()
|
||||||
mut obj2 := heroscript_loads(heroscript)!
|
mut obj2 := heroscript_loads(heroscript)!
|
||||||
set(obj2)!
|
set(obj2)!
|
||||||
|
install_action.done = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
mut other_actions := plbook.find(filter: 'garage_s3.')!
|
mut other_actions := plbook.find(filter: 'garage_s3.')!
|
||||||
for other_action in other_actions {
|
for mut other_action in other_actions {
|
||||||
if other_action.name in ['destroy', 'install', 'build'] {
|
if other_action.name in ['destroy', 'install', 'build'] {
|
||||||
mut p := other_action.params
|
mut p := other_action.params
|
||||||
reset := p.get_default_false('reset')
|
reset := p.get_default_false('reset')
|
||||||
@@ -163,6 +167,7 @@ pub fn play(mut plbook PlayBook) ! {
|
|||||||
garage_s3_obj.restart()!
|
garage_s3_obj.restart()!
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
other_action.done = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -178,19 +183,19 @@ fn startupmanager_get(cat startupmanager.StartupManagerType) !startupmanager.Sta
|
|||||||
// systemd
|
// systemd
|
||||||
match cat {
|
match cat {
|
||||||
.screen {
|
.screen {
|
||||||
console.print_debug('startupmanager: screen')
|
console.print_debug("installer: garage_s3' startupmanager get screen")
|
||||||
return startupmanager.get(.screen)!
|
return startupmanager.get(.screen)!
|
||||||
}
|
}
|
||||||
.zinit {
|
.zinit {
|
||||||
console.print_debug('startupmanager: zinit')
|
console.print_debug("installer: garage_s3' startupmanager get zinit")
|
||||||
return startupmanager.get(.zinit)!
|
return startupmanager.get(.zinit)!
|
||||||
}
|
}
|
||||||
.systemd {
|
.systemd {
|
||||||
console.print_debug('startupmanager: systemd')
|
console.print_debug("installer: garage_s3' startupmanager get systemd")
|
||||||
return startupmanager.get(.systemd)!
|
return startupmanager.get(.systemd)!
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
console.print_debug('startupmanager: auto')
|
console.print_debug("installer: garage_s3' startupmanager get auto")
|
||||||
return startupmanager.get(.auto)!
|
return startupmanager.get(.auto)!
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -208,7 +213,7 @@ pub fn (mut self GarageS3) start() ! {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
console.print_header('garage_s3 start')
|
console.print_header('installer: garage_s3 start')
|
||||||
|
|
||||||
if !installed()! {
|
if !installed()! {
|
||||||
install()!
|
install()!
|
||||||
@@ -221,7 +226,7 @@ pub fn (mut self GarageS3) start() ! {
|
|||||||
for zprocess in startupcmd()! {
|
for zprocess in startupcmd()! {
|
||||||
mut sm := startupmanager_get(zprocess.startuptype)!
|
mut sm := startupmanager_get(zprocess.startuptype)!
|
||||||
|
|
||||||
console.print_debug('starting garage_s3 with ${zprocess.startuptype}...')
|
console.print_debug('installer: garage_s3 starting with ${zprocess.startuptype}...')
|
||||||
|
|
||||||
sm.new(zprocess)!
|
sm.new(zprocess)!
|
||||||
|
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ pub fn play(mut plbook PlayBook) ! {
|
|||||||
return error("can't configure grafana, because no configuration allowed for this installer.")
|
return error("can't configure grafana, because no configuration allowed for this installer.")
|
||||||
}
|
}
|
||||||
mut other_actions := plbook.find(filter: 'grafana.')!
|
mut other_actions := plbook.find(filter: 'grafana.')!
|
||||||
for other_action in other_actions {
|
for mut other_action in other_actions {
|
||||||
if other_action.name in ['destroy', 'install', 'build'] {
|
if other_action.name in ['destroy', 'install', 'build'] {
|
||||||
mut p := other_action.params
|
mut p := other_action.params
|
||||||
reset := p.get_default_false('reset')
|
reset := p.get_default_false('reset')
|
||||||
@@ -68,6 +68,7 @@ pub fn play(mut plbook PlayBook) ! {
|
|||||||
grafana_obj.restart()!
|
grafana_obj.restart()!
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
other_action.done = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -83,19 +84,19 @@ fn startupmanager_get(cat startupmanager.StartupManagerType) !startupmanager.Sta
|
|||||||
// systemd
|
// systemd
|
||||||
match cat {
|
match cat {
|
||||||
.screen {
|
.screen {
|
||||||
console.print_debug('startupmanager: screen')
|
console.print_debug("installer: grafana' startupmanager get screen")
|
||||||
return startupmanager.get(.screen)!
|
return startupmanager.get(.screen)!
|
||||||
}
|
}
|
||||||
.zinit {
|
.zinit {
|
||||||
console.print_debug('startupmanager: zinit')
|
console.print_debug("installer: grafana' startupmanager get zinit")
|
||||||
return startupmanager.get(.zinit)!
|
return startupmanager.get(.zinit)!
|
||||||
}
|
}
|
||||||
.systemd {
|
.systemd {
|
||||||
console.print_debug('startupmanager: systemd')
|
console.print_debug("installer: grafana' startupmanager get systemd")
|
||||||
return startupmanager.get(.systemd)!
|
return startupmanager.get(.systemd)!
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
console.print_debug('startupmanager: auto')
|
console.print_debug("installer: grafana' startupmanager get auto")
|
||||||
return startupmanager.get(.auto)!
|
return startupmanager.get(.auto)!
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -106,7 +107,7 @@ pub fn (mut self Grafana) start() ! {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
console.print_header('grafana start')
|
console.print_header('installer: grafana start')
|
||||||
|
|
||||||
if !installed()! {
|
if !installed()! {
|
||||||
install()!
|
install()!
|
||||||
@@ -119,7 +120,7 @@ pub fn (mut self Grafana) start() ! {
|
|||||||
for zprocess in startupcmd()! {
|
for zprocess in startupcmd()! {
|
||||||
mut sm := startupmanager_get(zprocess.startuptype)!
|
mut sm := startupmanager_get(zprocess.startuptype)!
|
||||||
|
|
||||||
console.print_debug('starting grafana with ${zprocess.startuptype}...')
|
console.print_debug('installer: grafana starting with ${zprocess.startuptype}...')
|
||||||
|
|
||||||
sm.new(zprocess)!
|
sm.new(zprocess)!
|
||||||
|
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ pub fn play(mut plbook PlayBook) ! {
|
|||||||
return error("can't configure prometheus, because no configuration allowed for this installer.")
|
return error("can't configure prometheus, because no configuration allowed for this installer.")
|
||||||
}
|
}
|
||||||
mut other_actions := plbook.find(filter: 'prometheus.')!
|
mut other_actions := plbook.find(filter: 'prometheus.')!
|
||||||
for other_action in other_actions {
|
for mut other_action in other_actions {
|
||||||
if other_action.name in ['destroy', 'install', 'build'] {
|
if other_action.name in ['destroy', 'install', 'build'] {
|
||||||
mut p := other_action.params
|
mut p := other_action.params
|
||||||
reset := p.get_default_false('reset')
|
reset := p.get_default_false('reset')
|
||||||
@@ -68,6 +68,7 @@ pub fn play(mut plbook PlayBook) ! {
|
|||||||
prometheus_obj.restart()!
|
prometheus_obj.restart()!
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
other_action.done = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -83,19 +84,19 @@ fn startupmanager_get(cat startupmanager.StartupManagerType) !startupmanager.Sta
|
|||||||
// systemd
|
// systemd
|
||||||
match cat {
|
match cat {
|
||||||
.screen {
|
.screen {
|
||||||
console.print_debug('startupmanager: screen')
|
console.print_debug("installer: prometheus' startupmanager get screen")
|
||||||
return startupmanager.get(.screen)!
|
return startupmanager.get(.screen)!
|
||||||
}
|
}
|
||||||
.zinit {
|
.zinit {
|
||||||
console.print_debug('startupmanager: zinit')
|
console.print_debug("installer: prometheus' startupmanager get zinit")
|
||||||
return startupmanager.get(.zinit)!
|
return startupmanager.get(.zinit)!
|
||||||
}
|
}
|
||||||
.systemd {
|
.systemd {
|
||||||
console.print_debug('startupmanager: systemd')
|
console.print_debug("installer: prometheus' startupmanager get systemd")
|
||||||
return startupmanager.get(.systemd)!
|
return startupmanager.get(.systemd)!
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
console.print_debug('startupmanager: auto')
|
console.print_debug("installer: prometheus' startupmanager get auto")
|
||||||
return startupmanager.get(.auto)!
|
return startupmanager.get(.auto)!
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -106,7 +107,7 @@ pub fn (mut self Prometheus) start() ! {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
console.print_header('prometheus start')
|
console.print_header('installer: prometheus start')
|
||||||
|
|
||||||
if !installed()! {
|
if !installed()! {
|
||||||
install()!
|
install()!
|
||||||
@@ -119,7 +120,7 @@ pub fn (mut self Prometheus) start() ! {
|
|||||||
for zprocess in startupcmd()! {
|
for zprocess in startupcmd()! {
|
||||||
mut sm := startupmanager_get(zprocess.startuptype)!
|
mut sm := startupmanager_get(zprocess.startuptype)!
|
||||||
|
|
||||||
console.print_debug('starting prometheus with ${zprocess.startuptype}...')
|
console.print_debug('installer: prometheus starting with ${zprocess.startuptype}...')
|
||||||
|
|
||||||
sm.new(zprocess)!
|
sm.new(zprocess)!
|
||||||
|
|
||||||
|
|||||||
@@ -37,6 +37,7 @@ pub fn get(args ArgsGet) !&RClone {
|
|||||||
if r.hexists('context:rclone', args.name)! {
|
if r.hexists('context:rclone', args.name)! {
|
||||||
data := r.hget('context:rclone', args.name)!
|
data := r.hget('context:rclone', args.name)!
|
||||||
if data.len == 0 {
|
if data.len == 0 {
|
||||||
|
print_backtrace()
|
||||||
return error('RClone with name: rclone does not exist, prob bug.')
|
return error('RClone with name: rclone does not exist, prob bug.')
|
||||||
}
|
}
|
||||||
mut obj := json.decode(RClone, data)!
|
mut obj := json.decode(RClone, data)!
|
||||||
@@ -45,12 +46,14 @@ pub fn get(args ArgsGet) !&RClone {
|
|||||||
if args.create {
|
if args.create {
|
||||||
new(args)!
|
new(args)!
|
||||||
} else {
|
} else {
|
||||||
|
print_backtrace()
|
||||||
return error("RClone with name 'rclone' does not exist")
|
return error("RClone with name 'rclone' does not exist")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return get(name: args.name)! // no longer from db nor create
|
return get(name: args.name)! // no longer from db nor create
|
||||||
}
|
}
|
||||||
return rclone_global[args.name] or {
|
return rclone_global[args.name] or {
|
||||||
|
print_backtrace()
|
||||||
return error('could not get config for rclone with name:rclone')
|
return error('could not get config for rclone with name:rclone')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -123,14 +126,15 @@ pub fn play(mut plbook PlayBook) ! {
|
|||||||
}
|
}
|
||||||
mut install_actions := plbook.find(filter: 'rclone.configure')!
|
mut install_actions := plbook.find(filter: 'rclone.configure')!
|
||||||
if install_actions.len > 0 {
|
if install_actions.len > 0 {
|
||||||
for install_action in install_actions {
|
for mut install_action in install_actions {
|
||||||
heroscript := install_action.heroscript()
|
heroscript := install_action.heroscript()
|
||||||
mut obj2 := heroscript_loads(heroscript)!
|
mut obj2 := heroscript_loads(heroscript)!
|
||||||
set(obj2)!
|
set(obj2)!
|
||||||
|
install_action.done = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
mut other_actions := plbook.find(filter: 'rclone.')!
|
mut other_actions := plbook.find(filter: 'rclone.')!
|
||||||
for other_action in other_actions {
|
for mut other_action in other_actions {
|
||||||
if other_action.name in ['destroy', 'install', 'build'] {
|
if other_action.name in ['destroy', 'install', 'build'] {
|
||||||
mut p := other_action.params
|
mut p := other_action.params
|
||||||
reset := p.get_default_false('reset')
|
reset := p.get_default_false('reset')
|
||||||
@@ -143,6 +147,7 @@ pub fn play(mut plbook PlayBook) ! {
|
|||||||
install()!
|
install()!
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
other_action.done = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ pub fn play(mut plbook PlayBook) ! {
|
|||||||
return error("can't configure restic, because no configuration allowed for this installer.")
|
return error("can't configure restic, because no configuration allowed for this installer.")
|
||||||
}
|
}
|
||||||
mut other_actions := plbook.find(filter: 'restic.')!
|
mut other_actions := plbook.find(filter: 'restic.')!
|
||||||
for other_action in other_actions {
|
for mut other_action in other_actions {
|
||||||
if other_action.name in ['destroy', 'install', 'build'] {
|
if other_action.name in ['destroy', 'install', 'build'] {
|
||||||
mut p := other_action.params
|
mut p := other_action.params
|
||||||
reset := p.get_default_false('reset')
|
reset := p.get_default_false('reset')
|
||||||
@@ -68,6 +68,7 @@ pub fn play(mut plbook PlayBook) ! {
|
|||||||
restic_obj.restart()!
|
restic_obj.restart()!
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
other_action.done = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -83,19 +84,19 @@ fn startupmanager_get(cat startupmanager.StartupManagerType) !startupmanager.Sta
|
|||||||
// systemd
|
// systemd
|
||||||
match cat {
|
match cat {
|
||||||
.screen {
|
.screen {
|
||||||
console.print_debug('startupmanager: screen')
|
console.print_debug("installer: restic' startupmanager get screen")
|
||||||
return startupmanager.get(.screen)!
|
return startupmanager.get(.screen)!
|
||||||
}
|
}
|
||||||
.zinit {
|
.zinit {
|
||||||
console.print_debug('startupmanager: zinit')
|
console.print_debug("installer: restic' startupmanager get zinit")
|
||||||
return startupmanager.get(.zinit)!
|
return startupmanager.get(.zinit)!
|
||||||
}
|
}
|
||||||
.systemd {
|
.systemd {
|
||||||
console.print_debug('startupmanager: systemd')
|
console.print_debug("installer: restic' startupmanager get systemd")
|
||||||
return startupmanager.get(.systemd)!
|
return startupmanager.get(.systemd)!
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
console.print_debug('startupmanager: auto')
|
console.print_debug("installer: restic' startupmanager get auto")
|
||||||
return startupmanager.get(.auto)!
|
return startupmanager.get(.auto)!
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -106,7 +107,7 @@ pub fn (mut self Restic) start() ! {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
console.print_header('restic start')
|
console.print_header('installer: restic start')
|
||||||
|
|
||||||
if !installed()! {
|
if !installed()! {
|
||||||
install()!
|
install()!
|
||||||
@@ -119,7 +120,7 @@ pub fn (mut self Restic) start() ! {
|
|||||||
for zprocess in startupcmd()! {
|
for zprocess in startupcmd()! {
|
||||||
mut sm := startupmanager_get(zprocess.startuptype)!
|
mut sm := startupmanager_get(zprocess.startuptype)!
|
||||||
|
|
||||||
console.print_debug('starting restic with ${zprocess.startuptype}...')
|
console.print_debug('installer: restic starting with ${zprocess.startuptype}...')
|
||||||
|
|
||||||
sm.new(zprocess)!
|
sm.new(zprocess)!
|
||||||
|
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ pub fn play(mut plbook PlayBook) ! {
|
|||||||
return error("can't configure s3, because no configuration allowed for this installer.")
|
return error("can't configure s3, because no configuration allowed for this installer.")
|
||||||
}
|
}
|
||||||
mut other_actions := plbook.find(filter: 's3.')!
|
mut other_actions := plbook.find(filter: 's3.')!
|
||||||
for other_action in other_actions {
|
for mut other_action in other_actions {
|
||||||
if other_action.name in ['destroy', 'install', 'build'] {
|
if other_action.name in ['destroy', 'install', 'build'] {
|
||||||
mut p := other_action.params
|
mut p := other_action.params
|
||||||
reset := p.get_default_false('reset')
|
reset := p.get_default_false('reset')
|
||||||
@@ -68,6 +68,7 @@ pub fn play(mut plbook PlayBook) ! {
|
|||||||
s3_obj.restart()!
|
s3_obj.restart()!
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
other_action.done = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -83,19 +84,19 @@ fn startupmanager_get(cat startupmanager.StartupManagerType) !startupmanager.Sta
|
|||||||
// systemd
|
// systemd
|
||||||
match cat {
|
match cat {
|
||||||
.screen {
|
.screen {
|
||||||
console.print_debug('startupmanager: screen')
|
console.print_debug("installer: s3' startupmanager get screen")
|
||||||
return startupmanager.get(.screen)!
|
return startupmanager.get(.screen)!
|
||||||
}
|
}
|
||||||
.zinit {
|
.zinit {
|
||||||
console.print_debug('startupmanager: zinit')
|
console.print_debug("installer: s3' startupmanager get zinit")
|
||||||
return startupmanager.get(.zinit)!
|
return startupmanager.get(.zinit)!
|
||||||
}
|
}
|
||||||
.systemd {
|
.systemd {
|
||||||
console.print_debug('startupmanager: systemd')
|
console.print_debug("installer: s3' startupmanager get systemd")
|
||||||
return startupmanager.get(.systemd)!
|
return startupmanager.get(.systemd)!
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
console.print_debug('startupmanager: auto')
|
console.print_debug("installer: s3' startupmanager get auto")
|
||||||
return startupmanager.get(.auto)!
|
return startupmanager.get(.auto)!
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -106,7 +107,7 @@ pub fn (mut self S3Installer) start() ! {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
console.print_header('s3 start')
|
console.print_header('installer: s3 start')
|
||||||
|
|
||||||
if !installed()! {
|
if !installed()! {
|
||||||
install()!
|
install()!
|
||||||
@@ -119,7 +120,7 @@ pub fn (mut self S3Installer) start() ! {
|
|||||||
for zprocess in startupcmd()! {
|
for zprocess in startupcmd()! {
|
||||||
mut sm := startupmanager_get(zprocess.startuptype)!
|
mut sm := startupmanager_get(zprocess.startuptype)!
|
||||||
|
|
||||||
console.print_debug('starting s3 with ${zprocess.startuptype}...')
|
console.print_debug('installer: s3 starting with ${zprocess.startuptype}...')
|
||||||
|
|
||||||
sm.new(zprocess)!
|
sm.new(zprocess)!
|
||||||
|
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ pub fn play(mut plbook PlayBook) ! {
|
|||||||
return error("can't configure griddriver, because no configuration allowed for this installer.")
|
return error("can't configure griddriver, because no configuration allowed for this installer.")
|
||||||
}
|
}
|
||||||
mut other_actions := plbook.find(filter: 'griddriver.')!
|
mut other_actions := plbook.find(filter: 'griddriver.')!
|
||||||
for other_action in other_actions {
|
for mut other_action in other_actions {
|
||||||
if other_action.name in ['destroy', 'install', 'build'] {
|
if other_action.name in ['destroy', 'install', 'build'] {
|
||||||
mut p := other_action.params
|
mut p := other_action.params
|
||||||
reset := p.get_default_false('reset')
|
reset := p.get_default_false('reset')
|
||||||
@@ -48,6 +48,7 @@ pub fn play(mut plbook PlayBook) ! {
|
|||||||
install()!
|
install()!
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
other_action.done = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ pub fn play(mut plbook PlayBook) ! {
|
|||||||
return error("can't configure cloudhypervisor, because no configuration allowed for this installer.")
|
return error("can't configure cloudhypervisor, because no configuration allowed for this installer.")
|
||||||
}
|
}
|
||||||
mut other_actions := plbook.find(filter: 'cloudhypervisor.')!
|
mut other_actions := plbook.find(filter: 'cloudhypervisor.')!
|
||||||
for other_action in other_actions {
|
for mut other_action in other_actions {
|
||||||
if other_action.name in ['destroy', 'install', 'build'] {
|
if other_action.name in ['destroy', 'install', 'build'] {
|
||||||
mut p := other_action.params
|
mut p := other_action.params
|
||||||
reset := p.get_default_false('reset')
|
reset := p.get_default_false('reset')
|
||||||
@@ -48,6 +48,7 @@ pub fn play(mut plbook PlayBook) ! {
|
|||||||
install()!
|
install()!
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
other_action.done = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ pub fn play(mut plbook PlayBook) ! {
|
|||||||
return error("can't configure docker, because no configuration allowed for this installer.")
|
return error("can't configure docker, because no configuration allowed for this installer.")
|
||||||
}
|
}
|
||||||
mut other_actions := plbook.find(filter: 'docker.')!
|
mut other_actions := plbook.find(filter: 'docker.')!
|
||||||
for other_action in other_actions {
|
for mut other_action in other_actions {
|
||||||
if other_action.name in ['destroy', 'install', 'build'] {
|
if other_action.name in ['destroy', 'install', 'build'] {
|
||||||
mut p := other_action.params
|
mut p := other_action.params
|
||||||
reset := p.get_default_false('reset')
|
reset := p.get_default_false('reset')
|
||||||
@@ -68,6 +68,7 @@ pub fn play(mut plbook PlayBook) ! {
|
|||||||
docker_obj.restart()!
|
docker_obj.restart()!
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
other_action.done = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -83,19 +84,19 @@ fn startupmanager_get(cat startupmanager.StartupManagerType) !startupmanager.Sta
|
|||||||
// systemd
|
// systemd
|
||||||
match cat {
|
match cat {
|
||||||
.screen {
|
.screen {
|
||||||
console.print_debug('startupmanager: screen')
|
console.print_debug("installer: docker' startupmanager get screen")
|
||||||
return startupmanager.get(.screen)!
|
return startupmanager.get(.screen)!
|
||||||
}
|
}
|
||||||
.zinit {
|
.zinit {
|
||||||
console.print_debug('startupmanager: zinit')
|
console.print_debug("installer: docker' startupmanager get zinit")
|
||||||
return startupmanager.get(.zinit)!
|
return startupmanager.get(.zinit)!
|
||||||
}
|
}
|
||||||
.systemd {
|
.systemd {
|
||||||
console.print_debug('startupmanager: systemd')
|
console.print_debug("installer: docker' startupmanager get systemd")
|
||||||
return startupmanager.get(.systemd)!
|
return startupmanager.get(.systemd)!
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
console.print_debug('startupmanager: auto')
|
console.print_debug("installer: docker' startupmanager get auto")
|
||||||
return startupmanager.get(.auto)!
|
return startupmanager.get(.auto)!
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -107,7 +108,7 @@ pub fn (mut self DockerInstaller) start() ! {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
console.print_header('docker start')
|
console.print_header('installer: docker start')
|
||||||
|
|
||||||
if !installed()! {
|
if !installed()! {
|
||||||
install()!
|
install()!
|
||||||
@@ -120,7 +121,7 @@ pub fn (mut self DockerInstaller) start() ! {
|
|||||||
for zprocess in startupcmd()! {
|
for zprocess in startupcmd()! {
|
||||||
mut sm := startupmanager_get(zprocess.startuptype)!
|
mut sm := startupmanager_get(zprocess.startuptype)!
|
||||||
|
|
||||||
console.print_debug('starting docker with ${zprocess.startuptype}...')
|
console.print_debug('installer: docker starting with ${zprocess.startuptype}...')
|
||||||
|
|
||||||
sm.new(zprocess)!
|
sm.new(zprocess)!
|
||||||
|
|
||||||
|
|||||||
@@ -38,6 +38,7 @@ pub fn get(args ArgsGet) !&LimaInstaller {
|
|||||||
if r.hexists('context:lima', args.name)! {
|
if r.hexists('context:lima', args.name)! {
|
||||||
data := r.hget('context:lima', args.name)!
|
data := r.hget('context:lima', args.name)!
|
||||||
if data.len == 0 {
|
if data.len == 0 {
|
||||||
|
print_backtrace()
|
||||||
return error('LimaInstaller with name: lima does not exist, prob bug.')
|
return error('LimaInstaller with name: lima does not exist, prob bug.')
|
||||||
}
|
}
|
||||||
mut obj := json.decode(LimaInstaller, data)!
|
mut obj := json.decode(LimaInstaller, data)!
|
||||||
@@ -46,12 +47,14 @@ pub fn get(args ArgsGet) !&LimaInstaller {
|
|||||||
if args.create {
|
if args.create {
|
||||||
new(args)!
|
new(args)!
|
||||||
} else {
|
} else {
|
||||||
|
print_backtrace()
|
||||||
return error("LimaInstaller with name 'lima' does not exist")
|
return error("LimaInstaller with name 'lima' does not exist")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return get(name: args.name)! // no longer from db nor create
|
return get(name: args.name)! // no longer from db nor create
|
||||||
}
|
}
|
||||||
return lima_global[args.name] or {
|
return lima_global[args.name] or {
|
||||||
|
print_backtrace()
|
||||||
return error('could not get config for lima with name:lima')
|
return error('could not get config for lima with name:lima')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -124,14 +127,15 @@ pub fn play(mut plbook PlayBook) ! {
|
|||||||
}
|
}
|
||||||
mut install_actions := plbook.find(filter: 'lima.configure')!
|
mut install_actions := plbook.find(filter: 'lima.configure')!
|
||||||
if install_actions.len > 0 {
|
if install_actions.len > 0 {
|
||||||
for install_action in install_actions {
|
for mut install_action in install_actions {
|
||||||
heroscript := install_action.heroscript()
|
heroscript := install_action.heroscript()
|
||||||
mut obj2 := heroscript_loads(heroscript)!
|
mut obj2 := heroscript_loads(heroscript)!
|
||||||
set(obj2)!
|
set(obj2)!
|
||||||
|
install_action.done = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
mut other_actions := plbook.find(filter: 'lima.')!
|
mut other_actions := plbook.find(filter: 'lima.')!
|
||||||
for other_action in other_actions {
|
for mut other_action in other_actions {
|
||||||
if other_action.name in ['destroy', 'install', 'build'] {
|
if other_action.name in ['destroy', 'install', 'build'] {
|
||||||
mut p := other_action.params
|
mut p := other_action.params
|
||||||
reset := p.get_default_false('reset')
|
reset := p.get_default_false('reset')
|
||||||
@@ -163,6 +167,7 @@ pub fn play(mut plbook PlayBook) ! {
|
|||||||
lima_obj.restart()!
|
lima_obj.restart()!
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
other_action.done = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -178,19 +183,19 @@ fn startupmanager_get(cat startupmanager.StartupManagerType) !startupmanager.Sta
|
|||||||
// systemd
|
// systemd
|
||||||
match cat {
|
match cat {
|
||||||
.screen {
|
.screen {
|
||||||
console.print_debug('startupmanager: screen')
|
console.print_debug("installer: lima' startupmanager get screen")
|
||||||
return startupmanager.get(.screen)!
|
return startupmanager.get(.screen)!
|
||||||
}
|
}
|
||||||
.zinit {
|
.zinit {
|
||||||
console.print_debug('startupmanager: zinit')
|
console.print_debug("installer: lima' startupmanager get zinit")
|
||||||
return startupmanager.get(.zinit)!
|
return startupmanager.get(.zinit)!
|
||||||
}
|
}
|
||||||
.systemd {
|
.systemd {
|
||||||
console.print_debug('startupmanager: systemd')
|
console.print_debug("installer: lima' startupmanager get systemd")
|
||||||
return startupmanager.get(.systemd)!
|
return startupmanager.get(.systemd)!
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
console.print_debug('startupmanager: auto')
|
console.print_debug("installer: lima' startupmanager get auto")
|
||||||
return startupmanager.get(.auto)!
|
return startupmanager.get(.auto)!
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -206,7 +211,7 @@ pub fn (mut self LimaInstaller) start() ! {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
console.print_header('lima start')
|
console.print_header('installer: lima start')
|
||||||
|
|
||||||
if !installed()! {
|
if !installed()! {
|
||||||
install()!
|
install()!
|
||||||
@@ -219,7 +224,7 @@ pub fn (mut self LimaInstaller) start() ! {
|
|||||||
for zprocess in startupcmd()! {
|
for zprocess in startupcmd()! {
|
||||||
mut sm := startupmanager_get(zprocess.startuptype)!
|
mut sm := startupmanager_get(zprocess.startuptype)!
|
||||||
|
|
||||||
console.print_debug('starting lima with ${zprocess.startuptype}...')
|
console.print_debug('installer: lima starting with ${zprocess.startuptype}...')
|
||||||
|
|
||||||
sm.new(zprocess)!
|
sm.new(zprocess)!
|
||||||
|
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ pub fn play(mut plbook PlayBook) ! {
|
|||||||
return error("can't configure pacman, because no configuration allowed for this installer.")
|
return error("can't configure pacman, because no configuration allowed for this installer.")
|
||||||
}
|
}
|
||||||
mut other_actions := plbook.find(filter: 'pacman.')!
|
mut other_actions := plbook.find(filter: 'pacman.')!
|
||||||
for other_action in other_actions {
|
for mut other_action in other_actions {
|
||||||
if other_action.name in ['destroy', 'install', 'build'] {
|
if other_action.name in ['destroy', 'install', 'build'] {
|
||||||
mut p := other_action.params
|
mut p := other_action.params
|
||||||
reset := p.get_default_false('reset')
|
reset := p.get_default_false('reset')
|
||||||
@@ -48,6 +48,7 @@ pub fn play(mut plbook PlayBook) ! {
|
|||||||
install()!
|
install()!
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
other_action.done = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ pub fn play(mut plbook PlayBook) ! {
|
|||||||
return error("can't configure podman, because no configuration allowed for this installer.")
|
return error("can't configure podman, because no configuration allowed for this installer.")
|
||||||
}
|
}
|
||||||
mut other_actions := plbook.find(filter: 'podman.')!
|
mut other_actions := plbook.find(filter: 'podman.')!
|
||||||
for other_action in other_actions {
|
for mut other_action in other_actions {
|
||||||
if other_action.name in ['destroy', 'install', 'build'] {
|
if other_action.name in ['destroy', 'install', 'build'] {
|
||||||
mut p := other_action.params
|
mut p := other_action.params
|
||||||
reset := p.get_default_false('reset')
|
reset := p.get_default_false('reset')
|
||||||
@@ -48,6 +48,7 @@ pub fn play(mut plbook PlayBook) ! {
|
|||||||
install()!
|
install()!
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
other_action.done = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ pub fn play(mut plbook PlayBook) ! {
|
|||||||
return error("can't configure youki, because no configuration allowed for this installer.")
|
return error("can't configure youki, because no configuration allowed for this installer.")
|
||||||
}
|
}
|
||||||
mut other_actions := plbook.find(filter: 'youki.')!
|
mut other_actions := plbook.find(filter: 'youki.')!
|
||||||
for other_action in other_actions {
|
for mut other_action in other_actions {
|
||||||
if other_action.name in ['destroy', 'install', 'build'] {
|
if other_action.name in ['destroy', 'install', 'build'] {
|
||||||
mut p := other_action.params
|
mut p := other_action.params
|
||||||
reset := p.get_default_false('reset')
|
reset := p.get_default_false('reset')
|
||||||
@@ -48,6 +48,7 @@ pub fn play(mut plbook PlayBook) ! {
|
|||||||
install()!
|
install()!
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
other_action.done = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ pub fn play(mut plbook PlayBook) ! {
|
|||||||
return error("can't configure bun, because no configuration allowed for this installer.")
|
return error("can't configure bun, because no configuration allowed for this installer.")
|
||||||
}
|
}
|
||||||
mut other_actions := plbook.find(filter: 'bun.')!
|
mut other_actions := plbook.find(filter: 'bun.')!
|
||||||
for other_action in other_actions {
|
for mut other_action in other_actions {
|
||||||
if other_action.name in ['destroy', 'install', 'build'] {
|
if other_action.name in ['destroy', 'install', 'build'] {
|
||||||
mut p := other_action.params
|
mut p := other_action.params
|
||||||
reset := p.get_default_false('reset')
|
reset := p.get_default_false('reset')
|
||||||
@@ -48,6 +48,7 @@ pub fn play(mut plbook PlayBook) ! {
|
|||||||
install()!
|
install()!
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
other_action.done = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ pub fn play(mut plbook PlayBook) ! {
|
|||||||
return error("can't configure imagemagick, because no configuration allowed for this installer.")
|
return error("can't configure imagemagick, because no configuration allowed for this installer.")
|
||||||
}
|
}
|
||||||
mut other_actions := plbook.find(filter: 'imagemagick.')!
|
mut other_actions := plbook.find(filter: 'imagemagick.')!
|
||||||
for other_action in other_actions {
|
for mut other_action in other_actions {
|
||||||
if other_action.name in ['destroy', 'install', 'build'] {
|
if other_action.name in ['destroy', 'install', 'build'] {
|
||||||
mut p := other_action.params
|
mut p := other_action.params
|
||||||
reset := p.get_default_false('reset')
|
reset := p.get_default_false('reset')
|
||||||
@@ -68,6 +68,7 @@ pub fn play(mut plbook PlayBook) ! {
|
|||||||
imagemagick_obj.restart()!
|
imagemagick_obj.restart()!
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
other_action.done = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -83,19 +84,19 @@ fn startupmanager_get(cat startupmanager.StartupManagerType) !startupmanager.Sta
|
|||||||
// systemd
|
// systemd
|
||||||
match cat {
|
match cat {
|
||||||
.screen {
|
.screen {
|
||||||
console.print_debug('startupmanager: screen')
|
console.print_debug("installer: imagemagick' startupmanager get screen")
|
||||||
return startupmanager.get(.screen)!
|
return startupmanager.get(.screen)!
|
||||||
}
|
}
|
||||||
.zinit {
|
.zinit {
|
||||||
console.print_debug('startupmanager: zinit')
|
console.print_debug("installer: imagemagick' startupmanager get zinit")
|
||||||
return startupmanager.get(.zinit)!
|
return startupmanager.get(.zinit)!
|
||||||
}
|
}
|
||||||
.systemd {
|
.systemd {
|
||||||
console.print_debug('startupmanager: systemd')
|
console.print_debug("installer: imagemagick' startupmanager get systemd")
|
||||||
return startupmanager.get(.systemd)!
|
return startupmanager.get(.systemd)!
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
console.print_debug('startupmanager: auto')
|
console.print_debug("installer: imagemagick' startupmanager get auto")
|
||||||
return startupmanager.get(.auto)!
|
return startupmanager.get(.auto)!
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -106,7 +107,7 @@ pub fn (mut self ImageMagick) start() ! {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
console.print_header('imagemagick start')
|
console.print_header('installer: imagemagick start')
|
||||||
|
|
||||||
if !installed()! {
|
if !installed()! {
|
||||||
install()!
|
install()!
|
||||||
@@ -119,7 +120,7 @@ pub fn (mut self ImageMagick) start() ! {
|
|||||||
for zprocess in startupcmd()! {
|
for zprocess in startupcmd()! {
|
||||||
mut sm := startupmanager_get(zprocess.startuptype)!
|
mut sm := startupmanager_get(zprocess.startuptype)!
|
||||||
|
|
||||||
console.print_debug('starting imagemagick with ${zprocess.startuptype}...')
|
console.print_debug('installer: imagemagick starting with ${zprocess.startuptype}...')
|
||||||
|
|
||||||
sm.new(zprocess)!
|
sm.new(zprocess)!
|
||||||
|
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ pub fn play(mut plbook PlayBook) ! {
|
|||||||
return error("can't configure lighttpd, because no configuration allowed for this installer.")
|
return error("can't configure lighttpd, because no configuration allowed for this installer.")
|
||||||
}
|
}
|
||||||
mut other_actions := plbook.find(filter: 'lighttpd.')!
|
mut other_actions := plbook.find(filter: 'lighttpd.')!
|
||||||
for other_action in other_actions {
|
for mut other_action in other_actions {
|
||||||
if other_action.name in ['destroy', 'install', 'build'] {
|
if other_action.name in ['destroy', 'install', 'build'] {
|
||||||
mut p := other_action.params
|
mut p := other_action.params
|
||||||
reset := p.get_default_false('reset')
|
reset := p.get_default_false('reset')
|
||||||
@@ -68,6 +68,7 @@ pub fn play(mut plbook PlayBook) ! {
|
|||||||
lighttpd_obj.restart()!
|
lighttpd_obj.restart()!
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
other_action.done = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -83,19 +84,19 @@ fn startupmanager_get(cat startupmanager.StartupManagerType) !startupmanager.Sta
|
|||||||
// systemd
|
// systemd
|
||||||
match cat {
|
match cat {
|
||||||
.screen {
|
.screen {
|
||||||
console.print_debug('startupmanager: screen')
|
console.print_debug("installer: lighttpd' startupmanager get screen")
|
||||||
return startupmanager.get(.screen)!
|
return startupmanager.get(.screen)!
|
||||||
}
|
}
|
||||||
.zinit {
|
.zinit {
|
||||||
console.print_debug('startupmanager: zinit')
|
console.print_debug("installer: lighttpd' startupmanager get zinit")
|
||||||
return startupmanager.get(.zinit)!
|
return startupmanager.get(.zinit)!
|
||||||
}
|
}
|
||||||
.systemd {
|
.systemd {
|
||||||
console.print_debug('startupmanager: systemd')
|
console.print_debug("installer: lighttpd' startupmanager get systemd")
|
||||||
return startupmanager.get(.systemd)!
|
return startupmanager.get(.systemd)!
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
console.print_debug('startupmanager: auto')
|
console.print_debug("installer: lighttpd' startupmanager get auto")
|
||||||
return startupmanager.get(.auto)!
|
return startupmanager.get(.auto)!
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -106,7 +107,7 @@ pub fn (mut self LightHttpdInstaller) start() ! {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
console.print_header('lighttpd start')
|
console.print_header('installer: lighttpd start')
|
||||||
|
|
||||||
if !installed()! {
|
if !installed()! {
|
||||||
install()!
|
install()!
|
||||||
@@ -119,7 +120,7 @@ pub fn (mut self LightHttpdInstaller) start() ! {
|
|||||||
for zprocess in startupcmd()! {
|
for zprocess in startupcmd()! {
|
||||||
mut sm := startupmanager_get(zprocess.startuptype)!
|
mut sm := startupmanager_get(zprocess.startuptype)!
|
||||||
|
|
||||||
console.print_debug('starting lighttpd with ${zprocess.startuptype}...')
|
console.print_debug('installer: lighttpd starting with ${zprocess.startuptype}...')
|
||||||
|
|
||||||
sm.new(zprocess)!
|
sm.new(zprocess)!
|
||||||
|
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ pub fn play(mut plbook PlayBook) ! {
|
|||||||
return error("can't configure tailwind, because no configuration allowed for this installer.")
|
return error("can't configure tailwind, because no configuration allowed for this installer.")
|
||||||
}
|
}
|
||||||
mut other_actions := plbook.find(filter: 'tailwind.')!
|
mut other_actions := plbook.find(filter: 'tailwind.')!
|
||||||
for other_action in other_actions {
|
for mut other_action in other_actions {
|
||||||
if other_action.name in ['destroy', 'install', 'build'] {
|
if other_action.name in ['destroy', 'install', 'build'] {
|
||||||
mut p := other_action.params
|
mut p := other_action.params
|
||||||
reset := p.get_default_false('reset')
|
reset := p.get_default_false('reset')
|
||||||
@@ -48,6 +48,7 @@ pub fn play(mut plbook PlayBook) ! {
|
|||||||
install()!
|
install()!
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
other_action.done = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ pub fn play(mut plbook PlayBook) ! {
|
|||||||
return error("can't configure tailwind4, because no configuration allowed for this installer.")
|
return error("can't configure tailwind4, because no configuration allowed for this installer.")
|
||||||
}
|
}
|
||||||
mut other_actions := plbook.find(filter: 'tailwind4.')!
|
mut other_actions := plbook.find(filter: 'tailwind4.')!
|
||||||
for other_action in other_actions {
|
for mut other_action in other_actions {
|
||||||
if other_action.name in ['destroy', 'install', 'build'] {
|
if other_action.name in ['destroy', 'install', 'build'] {
|
||||||
mut p := other_action.params
|
mut p := other_action.params
|
||||||
reset := p.get_default_false('reset')
|
reset := p.get_default_false('reset')
|
||||||
@@ -48,6 +48,7 @@ pub fn play(mut plbook PlayBook) ! {
|
|||||||
install()!
|
install()!
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
other_action.done = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -38,6 +38,7 @@ pub fn get(args ArgsGet) !&TraefikServer {
|
|||||||
if r.hexists('context:traefik', args.name)! {
|
if r.hexists('context:traefik', args.name)! {
|
||||||
data := r.hget('context:traefik', args.name)!
|
data := r.hget('context:traefik', args.name)!
|
||||||
if data.len == 0 {
|
if data.len == 0 {
|
||||||
|
print_backtrace()
|
||||||
return error('TraefikServer with name: traefik does not exist, prob bug.')
|
return error('TraefikServer with name: traefik does not exist, prob bug.')
|
||||||
}
|
}
|
||||||
mut obj := json.decode(TraefikServer, data)!
|
mut obj := json.decode(TraefikServer, data)!
|
||||||
@@ -46,12 +47,14 @@ pub fn get(args ArgsGet) !&TraefikServer {
|
|||||||
if args.create {
|
if args.create {
|
||||||
new(args)!
|
new(args)!
|
||||||
} else {
|
} else {
|
||||||
|
print_backtrace()
|
||||||
return error("TraefikServer with name 'traefik' does not exist")
|
return error("TraefikServer with name 'traefik' does not exist")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return get(name: args.name)! // no longer from db nor create
|
return get(name: args.name)! // no longer from db nor create
|
||||||
}
|
}
|
||||||
return traefik_global[args.name] or {
|
return traefik_global[args.name] or {
|
||||||
|
print_backtrace()
|
||||||
return error('could not get config for traefik with name:traefik')
|
return error('could not get config for traefik with name:traefik')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -124,14 +127,15 @@ pub fn play(mut plbook PlayBook) ! {
|
|||||||
}
|
}
|
||||||
mut install_actions := plbook.find(filter: 'traefik.configure')!
|
mut install_actions := plbook.find(filter: 'traefik.configure')!
|
||||||
if install_actions.len > 0 {
|
if install_actions.len > 0 {
|
||||||
for install_action in install_actions {
|
for mut install_action in install_actions {
|
||||||
heroscript := install_action.heroscript()
|
heroscript := install_action.heroscript()
|
||||||
mut obj2 := heroscript_loads(heroscript)!
|
mut obj2 := heroscript_loads(heroscript)!
|
||||||
set(obj2)!
|
set(obj2)!
|
||||||
|
install_action.done = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
mut other_actions := plbook.find(filter: 'traefik.')!
|
mut other_actions := plbook.find(filter: 'traefik.')!
|
||||||
for other_action in other_actions {
|
for mut other_action in other_actions {
|
||||||
if other_action.name in ['destroy', 'install', 'build'] {
|
if other_action.name in ['destroy', 'install', 'build'] {
|
||||||
mut p := other_action.params
|
mut p := other_action.params
|
||||||
reset := p.get_default_false('reset')
|
reset := p.get_default_false('reset')
|
||||||
@@ -163,6 +167,7 @@ pub fn play(mut plbook PlayBook) ! {
|
|||||||
traefik_obj.restart()!
|
traefik_obj.restart()!
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
other_action.done = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -178,19 +183,19 @@ fn startupmanager_get(cat startupmanager.StartupManagerType) !startupmanager.Sta
|
|||||||
// systemd
|
// systemd
|
||||||
match cat {
|
match cat {
|
||||||
.screen {
|
.screen {
|
||||||
console.print_debug('startupmanager: screen')
|
console.print_debug("installer: traefik' startupmanager get screen")
|
||||||
return startupmanager.get(.screen)!
|
return startupmanager.get(.screen)!
|
||||||
}
|
}
|
||||||
.zinit {
|
.zinit {
|
||||||
console.print_debug('startupmanager: zinit')
|
console.print_debug("installer: traefik' startupmanager get zinit")
|
||||||
return startupmanager.get(.zinit)!
|
return startupmanager.get(.zinit)!
|
||||||
}
|
}
|
||||||
.systemd {
|
.systemd {
|
||||||
console.print_debug('startupmanager: systemd')
|
console.print_debug("installer: traefik' startupmanager get systemd")
|
||||||
return startupmanager.get(.systemd)!
|
return startupmanager.get(.systemd)!
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
console.print_debug('startupmanager: auto')
|
console.print_debug("installer: traefik' startupmanager get auto")
|
||||||
return startupmanager.get(.auto)!
|
return startupmanager.get(.auto)!
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -206,7 +211,7 @@ pub fn (mut self TraefikServer) start() ! {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
console.print_header('traefik start')
|
console.print_header('installer: traefik start')
|
||||||
|
|
||||||
if !installed()! {
|
if !installed()! {
|
||||||
install()!
|
install()!
|
||||||
@@ -219,7 +224,7 @@ pub fn (mut self TraefikServer) start() ! {
|
|||||||
for zprocess in startupcmd()! {
|
for zprocess in startupcmd()! {
|
||||||
mut sm := startupmanager_get(zprocess.startuptype)!
|
mut sm := startupmanager_get(zprocess.startuptype)!
|
||||||
|
|
||||||
console.print_debug('starting traefik with ${zprocess.startuptype}...')
|
console.print_debug('installer: traefik starting with ${zprocess.startuptype}...')
|
||||||
|
|
||||||
sm.new(zprocess)!
|
sm.new(zprocess)!
|
||||||
|
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ pub fn play(mut plbook PlayBook) ! {
|
|||||||
return error("can't configure zola, because no configuration allowed for this installer.")
|
return error("can't configure zola, because no configuration allowed for this installer.")
|
||||||
}
|
}
|
||||||
mut other_actions := plbook.find(filter: 'zola.')!
|
mut other_actions := plbook.find(filter: 'zola.')!
|
||||||
for other_action in other_actions {
|
for mut other_action in other_actions {
|
||||||
if other_action.name in ['destroy', 'install', 'build'] {
|
if other_action.name in ['destroy', 'install', 'build'] {
|
||||||
mut p := other_action.params
|
mut p := other_action.params
|
||||||
reset := p.get_default_false('reset')
|
reset := p.get_default_false('reset')
|
||||||
@@ -48,6 +48,7 @@ pub fn play(mut plbook PlayBook) ! {
|
|||||||
install()!
|
install()!
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
other_action.done = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user