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 8700093
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T02:06:28+00:00 2026-06-13T02:06:28+00:00

On an Amazon S3 Linux instance, I have two scripts called start_my_app and stop_my_app

  • 0

On an Amazon S3 Linux instance, I have two scripts called start_my_app and stop_my_app which start and stop forever (which in turn runs my Node.js application). I use these scripts to manually start and stop my Node.js application. So far so good.

My problem: I also want to set it up such that start_my_app is run whenever the system boots up. I know that I need to add a file inside init.d and I know how to symlink it to the proper directory within rc.d, but I can’t figure out what actually needs to go inside the file that I place in init.d. I’m thinking it should be just one line, like, start_my_app, but that hasn’t been working for me.

  • 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-13T02:06:30+00:00Added an answer on June 13, 2026 at 2:06 am

    The file you put in /etc/init.d/ have to be set to executable with:

    chmod +x /etc/init.d/start_my_app
    

    As pointed out by @meetamit, if it still does not run you might have to create a symbolic link to the file in /etc/rc.d/

    ln -s /etc/init.d/start_my_app /etc/rc.d/
    

    Please note that on the latest versions of Debian, this will not work as your script will have to be LSB compliant (provide at least the following actions: start, stop, restart, force-reload, and status):
    https://wiki.debian.org/LSBInitScripts

    As a note, you should always use the absolute path to files in your scripts instead of the relative one, it may solve unexpected issues:

    /var/myscripts/start_my_app
    

    Finally, make sure that you included the shebang on top of the file:

    #!/bin/sh
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have trouble installing this library called librsync on an Amazon standard linux instance.
I have an amazon ec2 instance running on the Amazon Linux AMI and its
I have elastic search running on a linux instance on Amazon EC2. I use
I have developed a web service(using ruby/sinatra/sqs) which runs on Linux Red Hat. I
I have an ec2 instance running on amazon which has AMI(ami-1b814f72).Its running RedHat 4.4.4-13
I have setup a new Amazon Linux instance, what are the next steps to
I have an Amazon ec2 instance (linux). I'd like you (yes, you) to be
I have an EC2 instance set on the x64 amazon linux ami. I am
I work with Amazon Linux instances and I have a couple scripts to populate
I've launched an instance of the Basic 32-bit Amazon Linux AMI which has an

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.