Skip to content

Commit

Permalink
Improved the example start_xmlrpc.sh script to work a little better.
Browse files Browse the repository at this point in the history
  • Loading branch information
jathanism committed Apr 14, 2015
1 parent e8e4385 commit 84753e2
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
6 changes: 6 additions & 0 deletions docs/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,12 @@ New Features
`~trigger.cmds.Commando` and its subclasses. This allows you to specify a
delay time in seconds to wait between sending commands to devices.

Enhancements
------------

+ The example script the Trigger XMLRPC service has been improved to check the
pid file and kill the existing ``twistd`` process by process id.

.. _v.1.5:

1.5
Expand Down
7 changes: 5 additions & 2 deletions examples/xmlrpc_server/start_xmlrpc.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
#!/bin/bash

# Kill existing twistd
killall twistd
if [ -e twistd.pid ]; then
kill `cat twistd.pid`
echo "Killed twistd"
fi

# Start the mofo
TWISTD=`which twistd`
#$TWISTD -l trigger-xmlrpc.log --pidfile /var/run/trigger-xmlrpc.pid trigger-xmlrpc
$TWISTD -l trigger-xmlrpc.log trigger-xmlrpc -p 9000 -s 9001
$TWISTD -l trigger-xmlrpc.log trigger-xmlrpc -p 9090 -s 9091

# Watch the log
tail -f trigger-xmlrpc.log
2 changes: 1 addition & 1 deletion trigger/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__version__ = (1, 5, 1, 'b2')
__version__ = (1, 5, 1)

full_version = '.'.join(str(x) for x in __version__[0:3]) + \
''.join(__version__[3:])
Expand Down

0 comments on commit 84753e2

Please sign in to comment.