Adds scripts
This commit is contained in:
17
scripts/shell/discord-relay.sh
Executable file
17
scripts/shell/discord-relay.sh
Executable 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
1
scripts/shell/wslOff.sh
Executable file
@@ -0,0 +1 @@
|
||||
wsl.exe --shutdown
|
||||
Reference in New Issue
Block a user