MCPcopy
hub / github.com/cloudflare/cloudflared / uninstallLinuxService

Function uninstallLinuxService

cmd/cloudflared/linux_service.go:351–368  ·  view source on GitHub ↗
(c *cli.Context)

Source from the content-addressed store, hash-verified

349}
350
351func uninstallLinuxService(c *cli.Context) error {
352 log := logger.CreateLoggerFromContext(c, logger.EnableTerminalLog)
353
354 var err error
355 switch {
356 case isSystemd():
357 log.Info().Msg("Using Systemd")
358 err = uninstallSystemd(log)
359 default:
360 log.Info().Msg("Using SysV")
361 err = uninstallSysv(log)
362 }
363
364 if err == nil {
365 log.Info().Msg("Linux service for cloudflared uninstalled successfully")
366 }
367 return err
368}
369
370func uninstallSystemd(log *zerolog.Logger) error {
371 // Get only the installed services

Callers

nothing calls this directly

Calls 4

CreateLoggerFromContextFunction · 0.92
isSystemdFunction · 0.85
uninstallSystemdFunction · 0.85
uninstallSysvFunction · 0.85

Tested by

no test coverage detected