Adds scripts

This commit is contained in:
Matheus Albino
2024-07-08 00:01:09 -03:00
parent 3ae42061ee
commit a09a3c7e2c
2 changed files with 18 additions and 0 deletions

17
scripts/shell/discord-relay.sh Executable file
View File

@@ -0,0 +1,17 @@
#!/bin/sh
exec sudo socat UNIX-LISTEN:/var/run/discord-ipc-0,fork,group=discord,umask=007 EXEC:"npiperelay.exe -ep -s //./pipe/discord-ipc-0",nofork &
exit 0
# Function to check if socat is running
check_socat_running() {
pgrep -x socat > /dev/null
}
# Main loop to continuously check and restart foo.sh if socat is not running
while true; do
if ! check_socat_running; then
exec sudo socat UNIX-LISTEN:/var/run/discord-ipc-0,fork,group=discord,umask=007 EXEC:"npiperelay.exe -ep -s //./pipe/discord-ipc-0",nofork
fi
sleep 10 # Adjust the sleep duration as per your requirement (in seconds)
done

1
scripts/shell/wslOff.sh Executable file
View File

@@ -0,0 +1 @@
wsl.exe --shutdown