Skip to content

Instantly share code, notes, and snippets.

@kekneus373
Created January 1, 2026 10:31
Show Gist options
  • Select an option

  • Save kekneus373/ef0d13b23907a09d0eaa69944622aaba to your computer and use it in GitHub Desktop.

Select an option

Save kekneus373/ef0d13b23907a09d0eaa69944622aaba to your computer and use it in GitHub Desktop.
[NixOS] Script for killing the TeamViewer service (w/o systemd)
#!/usr/bin/env bash
# Check if the script is running with root privileges
if [ $(id -u) != 0 ]; then
echo "This script must be run as root."
exit 1
fi
# Check if the teamviewerd process exists and kill it if it does
if pgrep -x teamviewerd > /dev/null
then
echo "Killing teamviewerd process..."
pkill teamviewerd
else
echo "teamviewerd process not found."
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment