Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
66 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<?xml version='1.0'?> | ||
<!DOCTYPE service_bundle SYSTEM '/usr/share/lib/xml/dtd/service_bundle.dtd.1'> | ||
<service_bundle type='manifest' name='export'> | ||
<service name='network/nginx' type='service' version='0'> | ||
<create_default_instance enabled='true'/> | ||
<single_instance/> | ||
<dependency name='fs' grouping='require_all' restart_on='none' type='service'> | ||
<service_fmri value='svc:/system/filesystem/local'/> | ||
</dependency> | ||
<dependency name='net' grouping='require_all' restart_on='none' type='service'> | ||
<service_fmri value='svc:/network/loopback'/> | ||
</dependency> | ||
<dependent name='nginx' restart_on='none' grouping='optional_all'> | ||
<service_fmri value='svc:/milestone/multi-user'/> | ||
</dependent> | ||
<exec_method name='start' type='method' exec='/opt/local/sbin/nginx -c /opt/local/conf/nginx.conf' timeout_seconds='60'> | ||
<method_context working_directory='/var/log'> | ||
<method_credential user='root' group='root'/> | ||
<method_environment> | ||
<envvar name='PATH' value='/usr/bin:/bin:/opt/csw/bin:/opt/local/bin'/> | ||
</method_environment> | ||
</method_context> | ||
</exec_method> | ||
<exec_method name='stop' type='method' exec=':kill' timeout_seconds='60'> | ||
<method_context/> | ||
</exec_method> | ||
</service> | ||
</service_bundle> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
#!/bin/sh | ||
VERSION=1.5.2 | ||
|
||
PREFIX=/opt/local | ||
|
||
NGINX_FILE="nginx-$VERSION.tar.gz" | ||
NGINX_DIR="nginx-$VERSION" | ||
|
||
PCRE_FILE="pcre-8.33.tar.gz" | ||
PCRE_DIR="pcre-8.33" | ||
|
||
pkgin -y install gcc-compiler gmake | ||
|
||
# nginx requires newer PCRE | ||
curl "ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/$PCRE_FILE" -o "$PCRE_FILE" | ||
tar -xf "$PCRE_FILE" | ||
|
||
cd $PCRE_DIR | ||
./configure --prefix=$PREFIX && gmake && gmake install | ||
cd .. | ||
|
||
# fetch and install nginx | ||
curl "http://nginx.org/download/$NGINX_FILE" -o "$NGINX_FILE" | ||
tar -xf "$NGINX_FILE" | ||
|
||
cd "$NGINX_DIR" | ||
./configure --prefix=$PREFIX && gmake && gmake install | ||
cd .. | ||
|
||
# install service manifest | ||
svccfg import ../files/nginx-smf.xml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
#!/bin/sh | ||
svcadm enable network/nginx |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"name": "nginx", | ||
"version": "1.0.0", | ||
"description": "nginx" | ||
} |