Commits

Jason R. Coombs committed 9910a09

Let pmxbot assume local host name is appropriate for logs URL

  • Participants
  • Parent commits 3c18ca8
  • Tags 1104.2

Comments (0)

Files changed (3)

File deploy/init.d/pmxbot-web

         #   0 if daemon has been started
         #   1 if daemon was already running
         #   2 if daemon could not be started
-        start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON --test > /dev/null \
+        start-stop-daemon --start --background --make-pidfile --quiet --pidfile $PIDFILE --exec $DAEMON --test > /dev/null \
                 || return 1
-        start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON -- \
+        start-stop-daemon --start --background --make-pidfile --quiet --pidfile $PIDFILE --exec $DAEMON -- \
                 $DAEMON_ARGS \
                 || return 2
         # Add code here, if necessary, that waits for the process to be ready

File pmxbot/__init__.py

 # -*- coding: utf-8 -*-
 # vim:ts=4:sw=4:noexpandtab
 
+import socket
+
 from .dictlib import ConfigDict
 
 config = ConfigDict(
 	],
 	librarypaste = 'http://paste.jaraco.com',
 )
+config['logs URL'] = 'http://' + socket.getfqdn()
+
 "The config object"

File pmxbot/logging.py

 
 @command("logs", doc="Where can one find the logs?")
 def logs(client, event, channel, nick, rest):
-	return pmxbot.config.get('logs URL') or ("I don't know where the logs "
-		"are. Maybe try http://{server_host} or ask the admin to set the "
-		"'logs URL' config parameter.".format(**pmxbot.config))
+	return pmxbot.config.get('logs URL')