Arthur de Jong

Open Source / Free Software developer

summaryrefslogtreecommitdiffstats
path: root/pynslcd/pynslcd.py
diff options
context:
space:
mode:
authorArthur de Jong <arthur@arthurdejong.org>2012-07-15 21:20:35 +0200
committerArthur de Jong <arthur@arthurdejong.org>2012-07-15 21:20:35 +0200
commitf61567526817b73882e813ccb593b2669c5882e2 (patch)
treef9bd46a58d44d419ab5e2f2478fbfe944f7d6651 /pynslcd/pynslcd.py
parent352da06a2382a8437a64b3416f6d5cc83efd6c67 (diff)
set the pynslcd process name if possible
git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1720 ef36b2f9-881f-0410-afb5-c4e39611909c
Diffstat (limited to 'pynslcd/pynslcd.py')
-rwxr-xr-xpynslcd/pynslcd.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/pynslcd/pynslcd.py b/pynslcd/pynslcd.py
index 8ebd981..087911d 100755
--- a/pynslcd/pynslcd.py
+++ b/pynslcd/pynslcd.py
@@ -284,6 +284,12 @@ if __name__ == '__main__':
# read configuration file
cfg.read(config.NSLCD_CONF_PATH)
# FIXME: set tls_cacertdir, tls_cacertfile, tls_randfile, tls_ciphers, tls_cert, tls_key options immediately after parsing config
+ # set process title
+ try:
+ import setproctitle
+ setproctitle.setproctitle('pynslcd')
+ except ImportError:
+ pass
# set a default umask for the pidfile and socket
os.umask(0022)
# see if someone already locked the pidfile