Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
CIRCLE
/
agent
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
7
Merge Requests
0
Wiki
Members
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
44e57653
authored
Dec 19, 2014
by
Oliver Pinter
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added circle_agent rc script
parent
e2b5f082
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
3 deletions
+30
-3
bootstrap-freebsd.sh
+12
-3
bootstrap/freebsd/rc.d/circle_agent
+18
-0
No files found.
bootstrap-freebsd.sh
View file @
44e57653
...
@@ -26,8 +26,6 @@ then
...
@@ -26,8 +26,6 @@ then
git clone https://github.com/opntr/bme-cloud-circle-agent.git agent
git clone https://github.com/opntr/bme-cloud-circle-agent.git agent
fi
fi
cd
/root/agent
grep
"If a service"
/etc/rc.subr
grep
"If a service"
/etc/rc.subr
ret
=
$?
ret
=
$?
if
[
$ret
-eq
0
]
if
[
$ret
-eq
0
]
...
@@ -39,4 +37,15 @@ then
...
@@ -39,4 +37,15 @@ then
)
)
fi
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
bootstrap/freebsd/rc.d/circle_agent
0 → 100755
View file @
44e57653
#!/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
"
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment