// HOWTO PASS FILTER Query parameter to bash exec ?
This commit is contained in:
parent
8d097d7a0c
commit
dbec0e3c15
|
@ -5,6 +5,7 @@ require_once('functions.php');
|
||||||
|
|
||||||
$videosList = array();
|
$videosList = array();
|
||||||
|
|
||||||
|
// HOWTO PASS Query parameters to exec ?
|
||||||
exec("/bin/bash -c './get_astrxbian_index.sh F'", $videos);
|
exec("/bin/bash -c './get_astrxbian_index.sh F'", $videos);
|
||||||
exec("/bin/bash -c './check_my_wallet.sh'", $gg1);
|
exec("/bin/bash -c './check_my_wallet.sh'", $gg1);
|
||||||
|
|
||||||
|
|
|
@ -5,8 +5,10 @@
|
||||||
# License: AGPL-3.0 (https://choosealicense.com/licenses/agpl-3.0/)
|
# License: AGPL-3.0 (https://choosealicense.com/licenses/agpl-3.0/)
|
||||||
########################################################################
|
########################################################################
|
||||||
PREFIX="$1"
|
PREFIX="$1"
|
||||||
|
FILTER="$2"
|
||||||
[[ $PREFIX == "" ]] && PREFIX="Y"
|
[[ $PREFIX == "" ]] && PREFIX="Y"
|
||||||
YOU=$(ps auxf --sort=+utime | grep -w ipfs | grep -v -E 'color=auto|grep' | tail -n 1 | cut -d " " -f 1) && [[ ! $YOU ]] && echo "ipfs NOT RUNNING. EXIT" && exit 1
|
YOU=$(ps auxf --sort=+utime | grep -w ipfs | grep -v -E 'color=auto|grep' | tail -n 1 | cut -d " " -f 1) && [[ ! $YOU ]] && echo "ipfs NOT RUNNING. EXIT" && exit 1
|
||||||
|
|
||||||
# Filter no ipns link
|
# Filter no ipns link
|
||||||
cat /home/$YOU/.zen/{ipfs,ipfs_swarm}/.*/astroport/kodi/vstream/${PREFIX}ASTRXBIAN | grep -Ev "];;" | sort | uniq | tail -n +2
|
[[ ! $FILTER ]] && cat /home/$YOU/.zen/{ipfs,ipfs_swarm}/.*/astroport/kodi/vstream/${PREFIX}ASTRXBIAN | grep -Ev "];;" | sort | uniq | tail -n +2 && exit 0
|
||||||
|
cat /home/$YOU/.zen/{ipfs,ipfs_swarm}/.*/astroport/kodi/vstream/${PREFIX}ASTRXBIAN | grep -Ev "];;" | grep "$FILTER" | sort | uniq | tail -n +2
|
||||||
|
|
Loading…
Reference in New Issue