Commit 44e57653 by Oliver Pinter

added circle_agent rc script

parent e2b5f082
......@@ -26,8 +26,6 @@ then
git clone https://github.com/opntr/bme-cloud-circle-agent.git agent
fi
cd /root/agent
grep "If a service" /etc/rc.subr
ret=$?
if [ $ret -eq 0 ]
......@@ -39,4 +37,15 @@ then
)
fi
python agent.py
cd /root/agent
if [ -d /usr/local/etc/rc.d ]
then
cp bootstrap/freebsd/rc.d/circle_agent /usr/local/etc/rc.d
fi
if [ ! -f /etc/rc.conf.d/circle_agent ]
then
echo 'circle_agent_enable="YES"' > /etc/rc.conf.d/circle_agent
fi
service circle_agent start
#!/bin/sh
#
# $FreeBSD$
#
# PROVIDE: circle_agent
# REQUIRE: DAEMON NETWORKING
# KEYWORD: shutdown
. /etc/rc.subr
name="circle_agent"
rcvar="circle_agent_enable"
command="/usr/local/bin/python /root/agent.py"
pidfile="/var/run/${name}.pid"
load_rc_config $name
run_rc_command "$1"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment