mirror of
https://gitlab.sectorq.eu/jaydee/auto_import.git
synced 2025-12-14 10:34:53 +01:00
21 lines
477 B
Bash
21 lines
477 B
Bash
#!/bin/bash
|
|
THIS_HOST=`uname -n`
|
|
case $1 in
|
|
"start")
|
|
echo "`date` : Starting service" >> /tmp/auto_import.log
|
|
echo "$?" >> /tmp/auto_import.log
|
|
/share/Data/python/bin/python3 /usr/bin/auto_import.py > /dev/null 2>&1 &
|
|
echo "$?" >> /tmp/auto_import.log
|
|
;;
|
|
"stop")
|
|
echo lala1 >> /tmp/auto_import.log
|
|
kill -9 `ps |grep -e "auto_import.py"|grep -v grep|awk '{ print $1}'`
|
|
;;
|
|
"restart")
|
|
$0 stop
|
|
$0 start
|
|
;;
|
|
"status")
|
|
ps |grep -e "auto_import.py"|grep -v grep
|
|
;;
|
|
esac |