Browse Source

openwrt: remove f parameter on ps

oycol 3 years ago
parent
commit
ff5e8c1b7a
2 changed files with 6 additions and 6 deletions
  1. 3 3
      scripts/openwrt-daemon-2.sh
  2. 3 3
      scripts/openwrt-daemon.sh

+ 3 - 3
scripts/openwrt-daemon-2.sh

@@ -11,7 +11,7 @@ start() {
   if [ ! -f "${LOG_FILE}" ];then
   if [ ! -f "${LOG_FILE}" ];then
       touch "${LOG_FILE}"
       touch "${LOG_FILE}"
   fi
   fi
-  local PID=$(ps -ef|grep "netclient checkin -n all"|grep -v grep|awk '{print $1}')
+  local PID=$(ps -e|grep "netclient checkin -n all"|grep -v grep|awk '{print $1}')
   if [ "${PID}" ];then
   if [ "${PID}" ];then
     echo "service is running"
     echo "service is running"
     return
     return
@@ -22,7 +22,7 @@ start() {
 }
 }
 
 
 stop() {
 stop() {
-  local PID=$(ps -ef|grep "netclient checkin -n all"|grep -v grep|awk '{print $1}')
+  local PID=$(ps -e|grep "netclient checkin -n all"|grep -v grep|awk '{print $1}')
   if [ "${PID}" ];then
   if [ "${PID}" ];then
     kill "${PID}"
     kill "${PID}"
   fi
   fi
@@ -30,7 +30,7 @@ stop() {
 }
 }
 
 
 status() {
 status() {
-  local PID=$(ps -ef|grep "netclient checkin -n all"|grep -v grep|awk '{print $1}')
+  local PID=$(ps -e|grep "netclient checkin -n all"|grep -v grep|awk '{print $1}')
   if [ "${PID}" ];then
   if [ "${PID}" ];then
     echo -e "netclient[${PID}] is running \n"
     echo -e "netclient[${PID}] is running \n"
   else
   else

+ 3 - 3
scripts/openwrt-daemon.sh

@@ -11,7 +11,7 @@ start() {
   if [ ! -f "${LOG_FILE}" ];then
   if [ ! -f "${LOG_FILE}" ];then
       touch "${LOG_FILE}"
       touch "${LOG_FILE}"
   fi
   fi
-  local PIDS=($(ps -ef|grep "netclient checkin -n all"|grep -v grep|awk '{print $1}'))
+  local PIDS=($(ps -e|grep "netclient checkin -n all"|grep -v grep|awk '{print $1}'))
   if [ ${PIDS} ];then
   if [ ${PIDS} ];then
     echo "service is running"
     echo "service is running"
     return
     return
@@ -22,7 +22,7 @@ start() {
 }
 }
 
 
 stop() {
 stop() {
-  local PIDS=($(ps -ef|grep "netclient checkin -n all"|grep -v grep|awk '{print $1}'))
+  local PIDS=($(ps -e|grep "netclient checkin -n all"|grep -v grep|awk '{print $1}'))
   for i in "${PIDS[@]}"; do
   for i in "${PIDS[@]}"; do
     kill $i
     kill $i
   done
   done
@@ -30,7 +30,7 @@ stop() {
 }
 }
 
 
 status() {
 status() {
-  local PIDS=($(ps -ef|grep "netclient checkin -n all"|grep -v grep|awk '{print $1}'))
+  local PIDS=($(ps -e|grep "netclient checkin -n all"|grep -v grep|awk '{print $1}'))
   if [ ${PIDS} ];then
   if [ ${PIDS} ];then
     echo -e "netclient[${PIDS}] is running \n"
     echo -e "netclient[${PIDS}] is running \n"
   else
   else