diff --git a/scripts/shell/discord-relay.sh b/scripts/shell/discord-relay.sh new file mode 100755 index 0000000..5e58e53 --- /dev/null +++ b/scripts/shell/discord-relay.sh @@ -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 diff --git a/scripts/shell/wslOff.sh b/scripts/shell/wslOff.sh new file mode 100755 index 0000000..3860848 --- /dev/null +++ b/scripts/shell/wslOff.sh @@ -0,0 +1 @@ +wsl.exe --shutdown