News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

Run command after build

Started by antotan, February 26, 2010, 11:49:47 AM

Previous topic - Next topic

antotan

Hello. I need to run "apache2ctl restart" after every project build.
How can I do this?

Jenna

Quote from: antotan on February 26, 2010, 11:49:47 AM
Hello. I need to run "apache2ctl restart" after every project build.
How can I do this?
Use the postbuild steps in the projects build options.

antotan

thank you. I'v put in post build steps "sudo apache2ctl restart" but, obviusly, c::b told me that there's no tty and no askpass specified.
How can I allow execution of apache2ctl from my user, without do sudo? Or, how can I prompt a password within c::b?

rcoll

Write a script or batch file that will do exactly what you want it to do, then run that script or batch file from the post-build steps.

Ringo

Jenna

Quote from: rcoll on February 26, 2010, 12:25:31 PM
Write a script or batch file that will do exactly what you want it to do, then run that script or batch file from the post-build steps.

Ringo

The script still needs root-access.

But the script can be run thro a graphical front-end to su.

I use "su-to-root" from the "menu"-package, but "gksu" or "kdesudo" should also work.

In my case: "su-to-root -X -c </path/to/script>"