first commit
This commit is contained in:
16
hypr/scripts/restart.sh
Executable file
16
hypr/scripts/restart.sh
Executable file
@@ -0,0 +1,16 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ -z "$1" ]; then
|
||||
echo "use: $0 <program>"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
PROGRAM_NAME=$1
|
||||
|
||||
if pgrep -x "$PROGRAM_NAME" > /dev/null
|
||||
then
|
||||
pkill -x "$PROGRAM_NAME"
|
||||
sleep 1
|
||||
fi
|
||||
|
||||
$PROGRAM_NAME > /dev/null 2>&1 &
|
||||
Reference in New Issue
Block a user