mirror of
https://github.com/srid/nixos-config.git
synced 2025-12-26 15:04:59 +08:00
fuckport: add desc
This commit is contained in:
parent
532f335b3c
commit
690b461868
1 changed files with 6 additions and 3 deletions
|
|
@ -1,11 +1,14 @@
|
|||
{ writeShellApplication, jc, jq, ... }:
|
||||
|
||||
# Kill the process with the port open
|
||||
# Used only to kill stale ghc.
|
||||
# FIXME: This doesn't work when lsof returns *multiple* processes.
|
||||
writeShellApplication {
|
||||
name = "fuckport";
|
||||
runtimeInputs = [ jc jq ];
|
||||
meta.description = ''
|
||||
Kill the process with the port open
|
||||
|
||||
Used only to kill stale ghc.
|
||||
'';
|
||||
# FIXME: This doesn't work when lsof returns *multiple* processes.
|
||||
text = ''
|
||||
lsof -i :"$1"
|
||||
THEPID=$(lsof -i :"$1" | jc --lsof 2> /dev/null | jq '.[].pid')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue