feat: support readonly config and no docker sock
This commit is contained in:
parent
029f395673
commit
e216d4171f
7 changed files with 139 additions and 87 deletions
|
|
@ -5,9 +5,15 @@ import { setTimeout } from 'node:timers/promises'
|
|||
|
||||
import { Client } from 'undici'
|
||||
|
||||
import { getContext } from './config'
|
||||
import { pull } from './headscale'
|
||||
|
||||
export async function restartHeadscale() {
|
||||
const context = await getContext()
|
||||
if (!context.hasDockerSock) {
|
||||
return
|
||||
}
|
||||
|
||||
if (!process.env.HEADSCALE_CONTAINER) {
|
||||
throw new Error('HEADSCALE_CONTAINER is not set')
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue