Code::Blocks Forums
User forums => Help => Topic started by: 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?
-
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.
-
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?
-
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
-
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>"