run a script before suspend and after resume?

Asked by cariyawa

Hi All,
Can somebody tell me how can I run a script before suspend and after resume? Where should I place them?
-Thanks

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
Wyatt Smith
Solved:
Last query:
Last reply:
Revision history for this message
cariyawa (cariyawa) said :
#1

Suspend works well in my laptop as long as I don't use compiz. So I would like to disable compiz before suspend and enable after resume... At least that is the idea...:)

Revision history for this message
Best Wyatt Smith (wyatt-smith) said :
#2

I think these are the two directories that you are looking for

/etc/acpi/suspend.d
/etc/acpi/resume.d

Hope this helps

Revision history for this message
cariyawa (cariyawa) said :
#3

Thanks Wyatt Smith, that solved my question.