files/init.d/thumbor: Change the default port to 8888
authorW. Trevor King <wking@tremily.us>
Thu, 23 Oct 2014 22:34:26 +0000 (15:34 -0700)
committerW. Trevor King <wking@tremily.us>
Thu, 23 Oct 2014 22:34:26 +0000 (15:34 -0700)
Avoid:

  Traceback (most recent call last):
    File "/usr/lib/python-exec/python2.7/thumbor", line 9, in <module>
      load_entry_point('thumbor==4.5.4', 'console_scripts', 'thumbor')()
    File "/usr/lib64/python2.7/site-packages/thumbor/server.py", line 87, in main
      server.bind(context.server.port, context.server.ip)
    File "/usr/lib64/python2.7/site-packages/tornado/tcpserver.py", line 162, in bind
      backlog=backlog)
    File "/usr/lib64/python2.7/site-packages/tornado/netutil.py", line 90, in bind_sockets
      sock.bind(sockaddr)
    File "/usr/lib64/python2.7/socket.py", line 224, in meth
      return getattr(self._sock,name)(*args)
  socket.error: [Errno 13] Permission denied

because port 80 is a privledged port, and it's not worth using an
additional service like authbind [1] to give us the capability to bind
to it.  8888 is unprivileged, and it's Thumbor's default [2]

[1]: http://en.wikipedia.org/wiki/Authbind
[2]: https://github.com/thumbor/thumbor/wiki/Running#-p-or---port

files/init.d/thumbor

index 7680a1a4b77f625845181721fd79a9fd5d75b4d3..77b848e57915c8f7c0940aea39c720ff5e75574c 100755 (executable)
@@ -5,7 +5,7 @@ PC_GROUP="${PC_GROUP:-thumbor}"
 CONFIG="${CONFIG:-/etc/thumbor/${SVCNAME}.conf}"
 HOME="/var/lib/thumbor"
 HOST="${HOST:-0.0.0.0}"
-PORT="${PORT:-80}"
+PORT="${PORT:-8888}"
 KEYFILE="${KEYFILE:-}"
 command="/usr/bin/thumbor"
 pidfile="/run/${SVCNAME}.pid"