Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9118675
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T05:12:40+00:00 2026-06-17T05:12:40+00:00

Can we hook to similar start,stop etc events. Do we have to write them

  • 0

Can we hook to similar start,stop etc events. Do we have to write them as shell scripts? I know of mono port of .NET.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T05:12:41+00:00Added an answer on June 17, 2026 at 5:12 am

    You are looking for something called an ‘init script’. These are scripts that allow you to start or stop a service with a single command, like so:

    service httpd restart
    service httpd stop
    service httpd start
    

    Some Linux distributions do not include the service command, in which case you access init scripts directly by their location, /etc/init.d, like so.

    /etc/init.d/mysqld restart
    

    You can program your init script to accept whatever parameters you want (start, stop, restart, etc). Some basic tutorials on writing init scripts to get you started can be found at the following web pages:

    http://www.cyberciti.biz/tips/linux-write-sys-v-init-script-to-start-stop-service.html
    http://www.linuxquestions.org/questions/programming-9/how-to-write-init-script-376302/

    Many times an init script is unnecessary, and you can just go with the simpler option of executing your program in the background and killing it manually. Running an executable on Linux in the background can be done like so:

    ./some_prog arg1 arg2 &
    

    And killing it is done like this:

    kill `pgrep some_prog`
    

    If you are fairly new to Linux, that latter option might be a much easier way to go until you get a handle on init scripts and the general Linux service ecosystem.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I know I can hook into the client side events to run JavaScript after
I have a PHP app which can hook into multiple backends (currently MySQL or
Is there such a thing? I know that I can hook my function on
I know similar questions have been asked in relation to animating items within an
Can I find the port number if I only have the SOCKET? I am
I've looked around for duplicates and while some of them have similar titles, I
If I can hook into a Win32 process, will I be able to do:
I'm wondering how I can hook up an input type=file to send a picture
Is there anyway that I can hook into the tab completion for bash from
If I create a Google apps script, can I hook it up to Google

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.