Killswitch
Wrap your sensitive application in a kill switch
Install / Use
/learn @bep/KillswitchREADME
Application Kill Switch
This is a general-purpose and cross-platform application kill switch written in Go. The main use case is to protect applications running with the VPN when the VPN dies, and still keep general network connectivity. But it's extendable, so a time based kill switch for your develpoment IDE should also be possible: "Sorry, boss. My development environment will not start during Christmas!"
"A kill switch, also known as an emergency stop or e-stop, is a safety mechanism used to shut off a device in an emergency situation in which it cannot be shut down in the usual manner. (Wikipedia)"
Install
Killswitch is a Go application. The easiest way to intall it is via go get:
go get -v github.com/bep/killswitch
This application has been confirmed to work fine on OS X, and Linux, and Windows. Desktop notifications implemented on OS X and Linux.
Is it any good?
Use
Wrap your sensitive application with a kill switch.
Provide a path to the program to watch and its arguments (optional), and then a conditional.
The conditional can be a built-in (see the net command) or a heartbeat-script
you can write yourself (see the exec command).
-a, --args string The program argument list
-e, --exec string The program to watch
--interval int Interval between checks in seconds (default 5)
Kill Switches
killswitch net
Will kill your executable if a given network interface vanishes.
killswitch net
-n, --name string The name of the network interface that must be present
To get the correct interface name to use with this command, try
killswitch net list
killswitch exec
Will kill your executable if your provided script exits with an error code.
The script (typically a shell script on *nix or a cmd- or bat-script on Windows) must exit with a non-0 exit-code to signal that the application under watch should be killed.
See /testfiles for example scripts for both *nix and Windows.
If the script is not present on the PATH, the full path must be provided in name.
killswitch exec
-n, --name string The name of the script to use as heartbeat script. If not on PATH, the full path must be provided.
Related Skills
node-connect
344.4kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
99.2kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
344.4kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
344.4kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
