mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-29 21:56:42 +00:00
Merge pull request #276 from stefansaraev/pidof
don't confuse if [ ] expr if there is more than one running process
This commit is contained in:
commit
639d5d3942
@ -64,7 +64,7 @@ else
|
||||
TRANSMISSION_ARG="$TRANSMISSION_ARG -T"
|
||||
fi
|
||||
|
||||
if [ ! $(pidof transmission-daemon) ];then
|
||||
if [ ! "$(pidof transmission-daemon)" ];then
|
||||
chmod +x $ADDON_DIR/lib/*
|
||||
|
||||
LD_LIBRARY_PATH="$ADDON_DIR/lib:$LD_LIBRARY_PATH" transmission-daemon $TRANSMISSION_ARG &>$LOG_FILE
|
||||
|
@ -41,7 +41,7 @@ export LD_LIBRARY_PATH="$ADDON_DIR/lib:$LD_LIBRARY_PATH"
|
||||
|
||||
cp -R $ADDON_DIR/config/*.sample $ADDON_HOME > $LOG_FILE 2>&1
|
||||
|
||||
if [ ! $(pidof boblightd) ]; then
|
||||
if [ ! "$(pidof boblightd)" ]; then
|
||||
if [ -e $BOBLIGHT_CONFIG ]; then
|
||||
|
||||
# Make sure the xserver has started up
|
||||
@ -53,7 +53,7 @@ if [ ! $(pidof boblightd) ]; then
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ ! $(pidof boblight-X11) ]; then
|
||||
if [ ! "$(pidof boblight-X11)" ]; then
|
||||
if [ -e $BOBLIGHT_X11 ]; then
|
||||
|
||||
# Make sure the xserver has started up
|
||||
|
@ -46,7 +46,7 @@ fi
|
||||
TVHEADEND_ARG="-C -s -u root -g video -c $ADDON_HOME"
|
||||
|
||||
mkdir -p $ADDON_HOME
|
||||
if [ ! $(pidof $ADDON_BIN) ]; then
|
||||
if [ ! "$(pidof $ADDON_BIN)" ]; then
|
||||
# start userspace DVB driver/addon
|
||||
for driver_dvb in $(find /storage/.xbmc/addons/driver.dvb.*/bin/userspace-driver.sh -type f 2>/dev/null); do
|
||||
driver_dvb_name=$(echo $driver_dvb | awk 'BEGIN {FS="/"} {printf("%s", $5)}')
|
||||
|
@ -27,7 +27,7 @@ LOCKFILE="tvheadend.disabled"
|
||||
|
||||
ADDON_BIN="tvheadend"
|
||||
|
||||
if [ $(pidof $ADDON_BIN) ];then
|
||||
if [ "$(pidof $ADDON_BIN)" ];then
|
||||
mkdir -p "$LOCKDIR"
|
||||
touch "$LOCKDIR/$LOCKFILE"
|
||||
killall $ADDON_BIN
|
||||
|
@ -28,7 +28,7 @@ REMOVE_MODULES=`grep REMOVE_MODULES $ADDON_SETTINGS | awk '{print $3 }' | sed -e
|
||||
|
||||
case "$1" in
|
||||
hibernate|suspend)
|
||||
if [ $(pidof tvheadend) ];then
|
||||
if [ "$(pidof tvheadend)" ];then
|
||||
progress "Shutting down HTS TVHeadend for suspending..."
|
||||
tvheadend.stop
|
||||
for module in $REMOVE_MODULES ; do
|
||||
|
@ -60,7 +60,7 @@ fi
|
||||
done
|
||||
)
|
||||
|
||||
if [ ! $(pidof vdr.bin) ];then
|
||||
if [ ! "$(pidof vdr.bin)" ];then
|
||||
# start userspace DVB driver/addon
|
||||
for driver_dvb in $(find /storage/.xbmc/addons/driver.dvb.*/bin/userspace-driver.sh -type f 2>/dev/null); do
|
||||
driver_dvb_name=$(echo $driver_dvb | awk 'BEGIN {FS="/"} {printf("%s", $5)}')
|
||||
|
@ -25,7 +25,7 @@
|
||||
LOCKDIR="/var/lock/"
|
||||
LOCKFILE="vdr.disabled"
|
||||
|
||||
if [ $(pidof vdr.bin) ];then
|
||||
if [ "$(pidof vdr.bin)" ];then
|
||||
mkdir -p "$LOCKDIR"
|
||||
touch "$LOCKDIR/$LOCKFILE"
|
||||
killall vdr.bin
|
||||
|
Loading…
x
Reference in New Issue
Block a user