-
Notifications
You must be signed in to change notification settings - Fork 24
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
AJ ONeal
committed
Apr 24, 2013
1 parent
0872c1d
commit aa49a06
Showing
7 changed files
with
79 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,2 @@ | ||
* http://unix.stackexchange.com/questions/30303/how-to-create-a-deb-file-manually | ||
* http://unix.stackexchange.com/a/30435 |
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,9 @@ | ||
Package: hello-node | ||
Version: 1.0-0 | ||
Section: base | ||
Priority: optional | ||
Architecture: i386 | ||
Depends: | ||
Maintainer: AJ ONeal <[email protected]> | ||
Description: HelloNode! The installable NodeJS System Service | ||
Let's you install a nodejs app as a service, just to see how it feels. |
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,4 @@ | ||
#!/bin/bash | ||
# Start the services! | ||
|
||
service hello-node start |
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,22 @@ | ||
#!/bin/bash | ||
|
||
# Installs node if it isn't already installed | ||
# | ||
# Don't steamroll over a previously installed node version | ||
# TODO provide a local version of node? | ||
|
||
VER="0.10.4" | ||
ARCH="x86" | ||
if [ `arch | grep 64` ] | ||
then | ||
ARCH="x64" | ||
fi | ||
|
||
# TODO test version | ||
if [ ! -f /usr/local/bin/node ] | ||
then | ||
pushd /tmp | ||
wget -quiet -c "http://nodejs.org/dist/v${VER}/node-v${VER}-linux-${ARCH}.tar.gz" | ||
tar xvf node-v${VER}-linux-${ARCH}.tar.gz -C /tmp/ | ||
cp -a /tmp/node-v${VER}-linux-${ARCH}/* /usr/local/ | ||
fi |
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,4 @@ | ||
#!/bin/bash | ||
|
||
# Stop the appserver: | ||
service hello-node stop |
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,15 @@ | ||
# Hello Node System Service | ||
description "Hello Node System Service" | ||
|
||
start on filesystem | ||
stop on runlevel [06] | ||
|
||
console output | ||
respawn | ||
|
||
PATH="/opt/hello-node/bin/:/usr/local/bin:/usr/bin:${PATH}" | ||
script | ||
node /opt/hello-node/bin/server.js | ||
#node /usr/local/lib/hello-node/server.js | ||
#/opt/hello-node/bin/node /opt/hello-node/bin/server.js | ||
end script |
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,23 @@ | ||
#!/usr/bin/env bash | ||
|
||
rm -rf deb-src/opt/hello-node/ | ||
mkdir -p deb-src/opt/ | ||
|
||
rm -rf deb-dist/ | ||
mkdir -p deb-dist/ | ||
|
||
rsync -avhP ../HelloNode/ deb-src/opt/hello-node/ --delete | ||
pushd deb-src/ | ||
tar czf ../deb-dist/data.tar.gz [a-z]* | ||
pushd DEBIAN | ||
tar czf ../../deb-dist/control.tar.gz * | ||
popd | ||
popd | ||
|
||
pushd deb-dist/ | ||
echo 2.0 > ./debian-binary | ||
ar r ../hellonode-1.deb debian-binary control.tar.gz data.tar.gz | ||
popd | ||
|
||
rm -rf deb-src/opt/hello-node/ | ||
rm -rf deb-dist/ |