starting/stopping services in debian
Is there a package I can get that would enable me to type
service [servicename] [command] to initiate the service script in /etc/init.d with it's command? I'm so used to redhad and now that I'm in debian I find it long to have to type /etc/init.d/servicename command. Really this could probably be done with a bash script put into the bin folder, but my bash scripting knowledge is not advanced enough yet to do this myself. Any suggestions would be apreciated. Thanks. |
tab is your friend. once you type /et you can hit the tab key, then type in, again hit tab, and last type in the first bit of the service and hit tab to finish the service. space then start, stop, restart and you are done.
as for getting things to run like in RH with the service name command i have no clue. i had that same issue when i first moved to debain off of RH9, but even in RH9 you could always use the /etc/init.d/service command to work with things so now i do not worry about it. |
Yeah tab does help but typing service name is still faster. :P But not really a big issue. Either there's a script or something I can get/make or I'll just get used to it.
|
Link the /etc/init.d/ scripts you wish into /bin. At least here its enough.
|
Hmm yeah that could work. So all I type is apache start or apache stop. I'd rename it to something like srv_apache to avoid conflicts with existing commands. (ex: spamd)
|
Create a file named service containing the following:
Code:
/etc/init.d/$1 $2 |
Sweet! Thanks, I named it ser so it's even faster then it was in redhat. :D
|
just use alias.
You could just use the alias command to set an alias.
|
Quote:
Wow ... Thats something new I learnt today ... Cooooool !!! :) |
All times are GMT -5. The time now is 09:59 AM. |