Re: shell script when a user logs in

From: Oliver Elphick <olly(at)lfix(dot)co(dot)uk>
To: "Campano, Troy" <Troy(dot)Campano(at)LibertyMutual(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: shell script when a user logs in
Date: 2003-01-12 07:42:58
Message-ID: 1042357378.7660.108.camel@linda.lfix.co.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Fri, 2003-01-10 at 18:56, Campano, Troy wrote:
> Is there a shell script that executes when a user logs into
> postgresql?
>
> I wanted to do something like this. I modified the pg_ctl shell script
> so that it emails me when someone users pg_ctl to start/stop/etc the
> postgresql database.
>
> So I was wondering if there was something similar I could edit to
> email me when a user logs in and/or logs out from postgresql.

Assuming this is Unix, you can do this in the login script in the
postgresql home directory. What this is called varies with the shell
you are using: for Bourne shell it is .profile, for Cshell it is .login,
for bash it is .bash_profile, .bash_login and .profile.

If you are system administrator, you should be able to get the same
information more easily and reliably from the system logs.

--
Oliver Elphick Oliver(dot)Elphick(at)lfix(dot)co(dot)uk
Isle of Wight, UK http://www.lfix.co.uk/oliver
GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839 932A 614D 4C34 3E1D 0C1C
========================================
"For the LORD is good; his mercy is everlasting; and
his truth endureth to all generations."
Psalms 100:5

In response to

Browse pgsql-general by date

  From Date Subject
Next Message karthikeyan.balasubramanian 2003-01-12 10:41:40 PostgreSQL Startup Problem on Win98
Previous Message Bruno Wolff III 2003-01-11 19:22:37 Re: Mailing list archive feature request