added script to toggle 'jack-capture'
This commit is contained in:
parent
b697b70db1
commit
3bb27c3616
1 changed files with 15 additions and 0 deletions
15
toggle-jack-capture.sh
Executable file
15
toggle-jack-capture.sh
Executable file
|
@ -0,0 +1,15 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# author: Daniel Sommer <daniel.sommer@velvettear.de>
|
||||
# license: MIT
|
||||
|
||||
set -e
|
||||
|
||||
dir="$(dirname $(realpath "$0"))"
|
||||
|
||||
. "$dir/config.env"
|
||||
|
||||
url="$(""$dir"/url.sh" "/systemd/jack-capture")"
|
||||
|
||||
printf "> sending POST request to \'$url\'...${FONT_BOLD}"
|
||||
[ "$(curl -X POST -s -f -w "\n%{http_code}" "$url" -d "state=toggle" | tail -n1)" -ne 200 ] && printf " error!\n" || printf " done!\n"
|
Loading…
Reference in a new issue