Re: shell script when a user logs in

Поиск
Список
Период
Сортировка
От Oliver Elphick
Тема Re: shell script when a user logs in
Дата
Msg-id 1042357378.7660.108.camel@linda.lfix.co.uk
обсуждение исходный текст
Ответ на shell script when a user logs in  ("Campano, Troy" <Troy.Campano@LibertyMutual.com>)
Список 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.Elphick@lfix.co.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


В списке pgsql-general по дате отправления:

Предыдущее
От: Bruno Wolff III
Дата:
Сообщение: Re: Mailing list archive feature request
Следующее
От: "karthikeyan.balasubramanian"
Дата:
Сообщение: PostgreSQL Startup Problem on Win98