You are not logged in.

#1 2008-08-28 10:09:58

killercow
Member
Registered: 2008-08-27
Posts: 22

[SOLVED] How to run commands during logoff?

Hi there,

Am trying to run the command "alsactl store" upon logoff so my volume levels are stored when I LOGOFF (which I assume will also apply to restarts and shutdowns too???). But I can't seem to find the necessary rc file...

Any help would be great!

Cheers,

KC

Last edited by killercow (2008-08-30 00:46:01)

Offline

#2 2008-08-28 10:20:25

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: [SOLVED] How to run commands during logoff?

/etc/rc.d/alsa does that for you - just add it to the DAEMONS list in /etc/rc.conf.

Offline

#3 2008-08-28 10:32:33

killercow
Member
Registered: 2008-08-27
Posts: 22

Re: [SOLVED] How to run commands during logoff?

tomk wrote:

/etc/rc.d/alsa does that for you - just add it to the DAEMONS list in /etc/rc.conf.

Excellent. Thank you!

However, it may be useful to know if a logoff file exists... can anyone point me to the right direction?

Offline

#4 2008-08-28 10:35:36

byte
Member
From: Düsseldorf (DE)
Registered: 2006-05-01
Posts: 2,046

Re: [SOLVED] How to run commands during logoff?

/etc/rc.local.shutdown


1000

Offline

#5 2008-08-28 10:39:11

Profjim
Member
From: NYC
Registered: 2008-03-24
Posts: 658

Re: [SOLVED] How to run commands during logoff?

/etc/rc.local.shutdown

You may have to create it.

Offline

#6 2008-08-28 11:53:17

killercow
Member
Registered: 2008-08-27
Posts: 22

Re: [SOLVED] How to run commands during logoff?

Thanks all. smile

Offline

#7 2008-08-28 12:27:23

Onwards
Member
From: Pakistan
Registered: 2007-04-18
Posts: 108

Re: [SOLVED] How to run commands during logoff?

If you are talking abt. logging off from bash/konsole, there is no file [in my head smile] that we can insert our own commands into.

Logging out of a DE session should 've their config files, but I don't know them smile

Offline

#8 2008-08-28 13:30:38

Profjim
Member
From: NYC
Registered: 2008-03-24
Posts: 658

Re: [SOLVED] How to run commands during logoff?

logging out from bash: I think ".bash_logout" works, or maybe either of ".bash_logout" ".logout". man bash should say.

But I think killercow was talking about rebooting, not just exiting his shell.

Offline

#9 2008-08-28 15:49:46

Onwards
Member
From: Pakistan
Registered: 2007-04-18
Posts: 108

Re: [SOLVED] How to run commands during logoff?

Thanx for pointing that out !!  I must 've been smokin dog-shit smile

Offline

#10 2008-08-29 00:00:21

tigrmesh
IRC Op
From: Florida, US
Registered: 2007-12-11
Posts: 794

Re: [SOLVED] How to run commands during logoff?

Would you please mark this thread as solved?  (Edit your first post)  Thanks!

Offline

#11 2008-08-30 00:47:10

killercow
Member
Registered: 2008-08-27
Posts: 22

Re: [SOLVED] How to run commands during logoff?

Edited, actually originally I did mean just ending a session. But after adding alsa to my daemon list I no longer needed to investigate it further.

Thanks for your feedback guys smile

Offline

Board footer

Powered by FluxBB