MCPcopy Create free account
hub / github.com/ChatLab/ChatLab / uninstallLinux

Function uninstallLinux

apps/cli/src/daemon/service.ts:241–260  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

239}
240
241function uninstallLinux(): void {
242 if (!fs.existsSync(SYSTEMD_SERVICE)) {
243 console.log('No system service found.')
244 removeMeta()
245 return
246 }
247 try {
248 execSync('systemctl --user disable --now chatlab.service', { stdio: 'pipe' })
249 } catch {
250 // already stopped
251 }
252 try {
253 execSync('systemctl --user daemon-reload', { stdio: 'pipe' })
254 } catch {
255 // ignore
256 }
257 fs.unlinkSync(SYSTEMD_SERVICE)
258 removeMeta()
259 console.log(`ChatLab system service removed.`)
260}
261
262function statusLinux(): ServiceStatus {
263 if (!fs.existsSync(SYSTEMD_SERVICE)) return { installed: false, running: false }

Callers 1

serviceUninstallFunction · 0.85

Calls 1

removeMetaFunction · 0.85

Tested by

no test coverage detected