summaryrefslogtreecommitdiff
path: root/bin/mailmanctl
Commit message (Collapse)AuthorAgeFilesLines
* Because of oddities in permissions, it is possible that when you runbwarsaw2002-12-021-0/+6
| | | | | | | | | | | | mailmanctl -u, you might not be able to completely delete a list through the web. This is because the archives are written with the group of the mailmanctl script, which can be changed if that's not root, but ttw list deletion will try to delete the archive as group mailman. If the users don't match (and they usually won't), permission crash. This just includes a warning and some helpful information in the docstring.
* Jon Parise's patch to improve the usage() output for the command linebwarsaw2002-10-211-2/+6
| | | | | | and cron scripts. When code/status == 0, there's no error (it's likely --help output) so send that to stdout. Otherwise, it's an error and the output goes to stderr.
* In the LogStdErr() call, we don't need to pass in the tee argument,bwarsaw2002-10-211-1/+1
| | | | since the default is fine.
* Updated docstringbwarsaw2002-10-041-32/+31
|
* check_privs(): Typo fix, gid and uid are needed outside the if test.bwarsaw2002-08-241-4/+5
| | | | Closes SF bug #599544 by Tokio Kikuchi.
* Patch set for SF bug #596565. Use symbolic user/group names insteadbwarsaw2002-08-231-4/+7
| | | | | | | | | | | | of numeric ids. Initial idea and patch by Todd Vierling, fleshed out by Barry. Specific changes here: check_privs(): since we only have the MAILMAN_USER and MAILMAN_GROUP names here, we need to convert them to their numeric ids via getgrnam()/getpwnam(). We need the ids because setgid() and setuid() want ids.
* Stop runaway restarts by imposing a maximum restart value (currentlybwarsaw2002-08-141-4/+14
| | | | | | 10). If a qrunner exits with something other than SIGINT, its restart counter gets incremented and if that is greater than MAX_RESTARTS, that qrunner won't be restarted.
* Fixed some string markup for i18n.bwarsaw2002-08-101-3/+3
|
* acquire_lock_1(): Fix for bug # 565917 by Dale Stimson. The tempfilebwarsaw2002-07-241-2/+2
| | | | | | | needs to be prepended with the LOCK_DIR otherwise the unlink will fail. Also fixed a typo in the docstring.
* get_lock_data(): Be sure to os.path.split() the filename because allbwarsaw2002-05-061-1/+1
| | | | | | | the useful data is encoded in the last path component. Otherwise the calculation gets messed up if the lock file is something like /usr/local/mailman-2.1/locks/...
* main(): Use a more POSIX-ly correct way to extract the exit status andbwarsaw2002-04-261-11/+16
| | | | signal number from the os.wait() status value.
* main(): Write the master-qrunner.pid file with 660 permissions.bwarsaw2002-03-291-4/+9
|
* acquire_lock_1(): Unset the failing non-force lock's private `owned'bwarsaw2002-01-111-4/+3
| | | | | | | | | flag so that when it's garbage collected, the lock files won't be removed. Since they're the same as the forced lock's files, we'd be removing the files at the wrong time. acquire_lock(): Rearrange the return values so the logic is a little easier to follow. Move the "return lock" into the try stanza.
* start_runner(): Pass the -s flag to the qrunner script, which tells itbwarsaw2001-11-211-1/+1
| | | | | to run as a mailmanctl subproc (subtly, but usefully changing it's exit semantics).
* Fix typo in module docstring, reported by Ousmane Wilanebwarsaw2001-11-201-1/+1
|
* tee_to_stdout=1 in the error handler.bwarsaw2001-11-201-1/+1
|
* Rebind stderr to logs/error.bwarsaw2001-10-241-0/+3
|
* A fairly significant rewrite, but now the `restart' command actuallybwarsaw2001-10-181-94/+301
| | | | | | | | | | | | | | | | | | does the right thing! The sub-qrunners are exec'd now from bin/qrunner using some new command line options, so killing and (auto-)restarting them will cleanly reload any changed modules. Also, the lock is acquired in the foreground so you don't get ugly error messages if another master qrunner is already running. Finally, the separate lock-refresher process is gone. Too hard to implement correct lock ownership transfer semantics with it (it was more complicated than the simple pass-thru to the child). Now, lock refresh is implemented by a once-a-day alarm signal in the master qrunner process watcher. Also implemented the `reopen' command which causes all the log files to be re-opened (very useful if you're rotating log files!).
* Ben Gertzfield's patch to hardcode the path to the python executablebwarsaw2001-09-071-1/+1
| | | | | | | | | | | | | into the script's #! line -- based on --with-python settings, without losing CVS revision history. #! /usr/bin/env python becomes #! @PYTHON@ which gets substituted for in configure.
* main(): Added the -s/--stale-lock-cleanup switch so that if mailmanctl finds abwarsaw2001-08-151-12/+87
| | | | | | | | | | | | stale lock (by matching hostname and pid) it will delete the lock files before trying to reclaim them. Also added -q/--quiet to suppress status messages (but not error messages, which always go to stderr). sigterm_handler(): We need to catch SIGTERM since that's what init will send us when changing run levels. SIGTERM just kills all the sub-qrunners with SIGINT (i.e. no restart).
* main(): John Read's suggestion to include messages about whatbwarsaw2001-07-251-0/+3
| | | | mailmanctl is doing.
* main(): Print a slightly more informative error message if thebwarsaw2001-07-251-1/+5
| | | | master-qrunner lock could not be acquired.
* check_privs(): Fix the error message to be a single stringbwarsaw2001-07-251-7/+26
| | | | | | | (concatenated strings are harder for some languages to translate correctly), and use the usage() method when the check fails. main(): Add -u / --run-as-user to skip the check_privs() test.
* check_privs(): new function that drops root privileges (if we have them) andtwouters2001-07-241-0/+12
| | | | | complains if we aren't running as the right user, gets called from main(). Should we check for the availability of os.(g|s)et(u|g)id ?
* intermediatebwarsaw2001-07-051-0/+169