wickedjackal

buckle

Jun 10th, 2024
445
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.41 KB | None | 0 0
  1. # ------------------Bucklespring---------------
  2. if ! pgrep -x "buckle" > /dev/null; then
  3.     echo "Bucklespring started on process: " && buckle &
  4. else
  5.     echo "Bucklespring is already running."
  6. fi
  7.  
  8. # Function to kill all processes containing "buckle"
  9. kill_buckle_processes() {
  10.     pkill -f "buckle"
  11. }
  12.  
  13. # Trap function to call kill_buckle_processes when the shell exits
  14. trap 'kill_buckle_processes' EXIT
Advertisement
Add Comment
Please, Sign In to add comment