mirror of
https://gitlab.sectorq.eu/jaydee/auto_import.git
synced 2025-12-14 10:34:53 +01:00
build
This commit is contained in:
21
auto_import.sh
Normal file
21
auto_import.sh
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
THIS_HOST=`uname -n`
|
||||||
|
case $1 in
|
||||||
|
"start")
|
||||||
|
echo "`date` : Starting service" >> /tmp/auto_import.log
|
||||||
|
echo "$?" >> /tmp/auto_import.log
|
||||||
|
/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
|
||||||
Reference in New Issue
Block a user