Permalink
Browse files

provide and document more system admin tools

  • Loading branch information...
1 parent 938b98b commit cd41f9bffd2b4e3b5c8b94c1d8c4ae702b48c332 @kr committed Mar 22, 2011
View
5 Index
@@ -0,0 +1,5 @@
+adm files useful for system administrators
+doc documentation
+m4 junk for autotools
+sh-tests tests written as shell scripts
+tests tests written in C
View
@@ -0,0 +1,37 @@
+The usual way to run beanstalkd is to type its name
+in a Unix shell prompt, like this:
+
+ $ beanstalkd
+
+This will start up the process and give you control over it.
+You can control its output (by default output is printed to
+the screen; you can arrange to have output go into file
+b.log by typing ">b.log" at the end of the command line),
+pause and restart the process (by pressing Control-Z and
+typing "fg"), and kill it (by pressing Control-C).
+This is most convenient while writing programs that use
+beanstalkd (or when working on beanstalkd itself), since
+you might want to start and stop it many times and regularly
+inspect its output.
+
+If you want beanstalkd to start when your operating system
+boots, the mechanism varies.
+
+Traditionally, you must add a command line to the shell script
+in /etc/rc (which is read by init when the system boots),
+using the "&" notation to run beanstalkd in the background.
+This would suffice for most situations, but it isn't always
+possible.
+
+These days, many popular operating systems have a replacement
+init program with its own configuration language. Example
+configuration files for several of these are included in
+subdirectories here, but the most common is probably "System V
+init", which reads /etc/inittab for lines describing commands
+to run at various times. If this file exists, you can add
+a line something like
+
+ bean:345:respawn:su nobody -c 'exec /usr/bin/beanstalkd'
+
+and type "telinit q" to tell init to reread its configuration.
+Type "man 5 inittab" for details of this notation.
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN"
+ "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>Label</key>
+ <string>beanstalkd</string>
+
+ <key>UserName</key>
+ <string>nobody</string>
+
+ <key>ProgramArguments</key>
+ <array>
+ <string>/usr/local/bin/beanstalkd</string>
+ </array>
+
+ <key>KeepAlive</key>
+ <true/>
+</dict>
+</plist>
@@ -0,0 +1,6 @@
+[Unit]
+Description=Beanstalkd is a simple, fast work queue
+
+[Service]
+User=nobody
+ExecStart=/usr/bin/beanstalkd
@@ -0,0 +1,8 @@
+[Unit]
+Description=Socket for beanstalkd, a simple, fast work queue
+
+[Socket]
+ListenStream=11300
+
+[Install]
+WantedBy=sockets.target
File renamed without changes.
File renamed without changes.
@@ -0,0 +1,9 @@
+description "simple, fast work queue"
+
+start on filesystem
+stop on runlevel [!2345]
+
+respawn
+respawn limit 5 2
+
+exec su nobody -c 'exec /usr/bin/beanstalkd'

0 comments on commit cd41f9b

Please sign in to comment.