Skip to content

Commit

Permalink
fixed lower port bind
Browse files Browse the repository at this point in the history
  • Loading branch information
gbarbieru committed Mar 15, 2023
1 parent e0ad207 commit e1a4d15
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 4 deletions.
2 changes: 1 addition & 1 deletion build/package/deb/control
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Package: vagrant-private-cloud
Version: 1.3.1
Version: 1.3.2
Section: web
Priority: optional
Architecture: all
Expand Down
2 changes: 2 additions & 0 deletions build/package/deb/postinst
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ case "${OP}" in
adduser --system --no-create-home --group vagrant || true
usermod -a -G syslog vagrant
chown vagrant:vagrant ${BASE_DIR} -R
setcap CAP_NET_BIND_SERVICE=+eip /usr/bin/node
systemctl enable "${SERVICE_NAME}" >/dev/null || true
systemctl start "${SERVICE_NAME}"|| log "Failed to start ${SERVICE_NAME} service"

Expand All @@ -33,6 +34,7 @@ case "${OP}" in
mkdir -p ${BASE_DIR}/storage
fi
chown vagrant:vagrant ${BASE_DIR} -R
setcap CAP_NET_BIND_SERVICE=+eip /usr/bin/node
systemctl --system daemon-reload > /dev/null || true
systemctl restart "${SERVICE_NAME}" || log "Failed to restart ${SERVICE_NAME} service"

Expand Down
9 changes: 8 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,11 @@ const server = require("./src/server.js");
const SERVER_HOST = config.get('server.host');
const SERVER_PORT = config.get('server.port');

server.listen(SERVER_PORT, SERVER_HOST);
server.listen({
port: SERVER_PORT,
host: SERVER_HOST
}).then((address) => {
server.log.warn(`Server started listening on ${address}`);
}).catch(error => {
server.log.error(error)
});
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vagrant-private-cloud",
"version": "1.3.1",
"version": "1.3.2",
"description": "Private (Atlas) Cloud for Vagrant Boxes",
"main": "index.js",
"scripts": {
Expand Down

0 comments on commit e1a4d15

Please sign in to comment.