-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
16 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,19 @@ | ||
#!/bin/bash | ||
pgrep ags > /dev/null | ||
if [[ "$?" != "0" ]]; then | ||
agsv1 -q; ags run ~/.config/agsv2/config.js | ||
|
||
# Check if ags is running | ||
if pgrep -x "ags" > /dev/null; then | ||
# If ags is running, kill it and start agsv1 | ||
echo "Stopping ags and starting agsv1..." | ||
ags quit -i js | ||
agsv1 run & | ||
elif pgrep -x "agsv1" > /dev/null; then | ||
# If agsv1 is running, kill it and start ags | ||
echo "Stopping agsv1 and starting ags..." | ||
agsv1 -q | ||
ags run -d ~/.config/agsv2 & | ||
else | ||
ags quit; agsv1 | ||
# If neither are running, start ags | ||
echo "Neither ags nor agsv1 are running. Starting ags..." | ||
#ags run -d ~/.config/agsv2 & | ||
fi | ||
|