... | ... |
@@ -404,15 +404,19 @@ function fgfs () { |
404 | 404 |
fi |
405 | 405 |
;; |
406 | 406 |
--map|--lnm) |
407 |
- if test \ |
|
408 |
- -x $fgfs_install/littlefgconnect/"Little FGconnect"/littlefgconnect \ |
|
409 |
- -a -r $FGADDON/Addons/littlenavmap/FGData/Protocol/littlenavmap.xml; then |
|
410 |
- nohup sh -c "$fgfs_install/littlefgconnect/Little\ FGconnect/littlefgconnect" > /dev/null 2>&1 & |
|
411 |
- fgfs_args+=("--addon=$FGADDON/Addons/littlenavmap") |
|
407 |
+ if ! pgrep -u $USER -fx "$fgfs_install/littlefgconnect/Little\ FGconnect/littlefgconnect" > /dev/null; then |
|
408 |
+ if test \ |
|
409 |
+ -x $fgfs_install/littlefgconnect/"Little FGconnect"/littlefgconnect \ |
|
410 |
+ -a -r $FGADDON/Addons/littlenavmap/FGData/Protocol/littlenavmap.xml; then |
|
411 |
+ nohup sh -c "$fgfs_install/littlefgconnect/Little\ FGconnect/littlefgconnect" > /dev/null 2>&1 & |
|
412 |
+ else |
|
413 |
+ echo "can't find Little FGconnect" |
|
414 |
+ return 1 |
|
415 |
+ fi |
|
412 | 416 |
else |
413 |
- echo "can't find Little FGconnect" |
|
414 |
- return 1 |
|
417 |
+ echo "Little FGconnect already lauched" |
|
415 | 418 |
fi |
419 |
+ fgfs_args+=("--addon=$FGADDON/Addons/littlenavmap") |
|
416 | 420 |
;; |
417 | 421 |
*) |
418 | 422 |
fgfs_args+=($fgfs_arg);; |