MCPcopy Index your code
hub / github.com/cameri/nostream / runStopMenu

Function runStopMenu

src/cli/tui/menus/stop.ts:6–27  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

4import { tuiPrompts } from '../prompts'
5
6export const runStopMenu = async (): Promise<number> => {
7 const nginx = await tuiPrompts.confirm({
8 message: 'Include Nginx stack while stopping?',
9 initialValue: false,
10 })
11
12 if (tuiPrompts.isCancel(nginx)) {
13 tuiPrompts.cancel('Cancelled')
14 return 1
15 }
16
17 const spinner = ora('Stopping relay...').start()
18 const code = await runStop({ tor: true, i2p: true, local: true, nginx }, [])
19
20 if (code === 0) {
21 spinner.succeed('Relay stop command completed')
22 } else {
23 spinner.fail('Relay stop command failed')
24 }
25
26 return code
27}

Callers 1

runTuiFunction · 0.90

Calls 1

runStopFunction · 0.90

Tested by

no test coverage detected