Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Making a Script to Start as a Service Post 302106338 by munna_dude on Thursday 8th of February 2007 12:37:32 AM
Old 02-08-2007
how

hi all

but how it is possible.
it is not working well.

my application is 'example'

how can i run this is in startup.

it contains the code

#!bin/sh
cd /bin
./example

i am using fedora4

can you please show me the way

thank you in advance
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Start a service as user

Hi I need a service to be start as user after a reboot. My script in /etc/init.d contain the following: start() { su - $USER cd ${INSTALL_PATH}/bin ./MyApp -X exit return 0 } This function stops after su - $USER, I get user shell, and only if I manualy... (5 Replies)
Discussion started by: potro
5 Replies

2. AIX

Q: how to start a service when system start

As topic, assume we have a service called "blahservice" and we can start it by: startsrc -s blahservice what is the best practice to run such command when system start? - directly use mkitab to add it into /etc/inittab or - drop startup scripts in /etc/rc.d/rcX.d I know they... (4 Replies)
Discussion started by: acerlinux
4 Replies

3. UNIX for Dummies Questions & Answers

Need help making a start/stop script...

i have two separate scripts that work nicely to curl and generate two files.. one html and one txt so a total of four. When the script starts up i want it to: call and run shellscripta call and run shellscriptb sleep for about 40 seconds again run shellscripta again run shellscriptb check... (4 Replies)
Discussion started by: phpfreak
4 Replies

4. Red Hat

vsftpd service failed to start

hi, i am using RHEL 5 and i am not able to on the vsftp i have tried to on the vsftp service using command service vsftpd start Starting vsftpd for vsftpd: i am posting the content of my /etc/xinetd.d/vsftpd file # description: The vsftpd FTP... (2 Replies)
Discussion started by: u.n.i.x
2 Replies

5. Red Hat

VSFTPD Service Failed to Start

Today I have installed VSFTPD but service is failing to start. We have been using standard FTP successful but need to introduce an FTPS option. I have run YUM install VSFTPD and everything appeared to load ok. (If I run rpm - qa | grep vsftpd I get vsftpd-2.0.5-16.el5_4.1 which I... (4 Replies)
Discussion started by: PaulComins
4 Replies

6. Red Hat

Can't start NTOP service/daemon

I have installed version of ntop 4.0.3 by guide. But I can't start ntop daemon/service. I didn't find a service file for starting. During the installation there was no problem only want to RRDTool so I installed that. Now there is no necessary package required. I didn't find in /etc/init.d/... (9 Replies)
Discussion started by: getrue
9 Replies

7. Shell Programming and Scripting

not able to start xvfb service via rc script

Hi , I am having this start script to start xvfb under rc3.d but it fails during system startup saying unable to open display. also manually if i try to execute the script , it does not work. But if i execute what ever is there in the script line by line on my SHELL , it starts well. ... (2 Replies)
Discussion started by: chidori
2 Replies

8. Solaris

How to make SMF service start last?

I need to start a service among the last on a freshly booted system. Via the manifest, I've made it dependent on very milestone on the computer yet the service still comes back with an error that a kstat variable in the kernel does not exist. I run it right the service process right there... (6 Replies)
Discussion started by: JWH
6 Replies

9. AIX

Start script or service with boot on AIX 7.2

I have installed apache2, but not run with boot in AIX 7.2, how to make it run ? in AIX 7.1 i used : mkitab "apache:2:once:/usr/IBMAHS/bin/apachectl start > /dev/null 2>&1" ### ---> not work in AIX 7.2 (i use 0 in once, because appear emoticon when use :once) Did you know that you can use... (4 Replies)
Discussion started by: penchev
4 Replies
rc2(8)							      System Manager's Manual							    rc2(8)

NAME
rc2 - Run command script executed when entering a multiuser run level SYNOPSIS
rc2 DESCRIPTION
The rc2 script contains run commands that enable initialization of the system to a multiuser state; run level 2. In addition to commands listed within the script itself, rc2 contains instructions to run certain commands found in the /sbin/rc2.d directory. The script defines the conditions under which the commands execute; some commands run if the system is booting, other commands execute if the system is chang- ing run levels. By convention, files in the /sbin/rc2.d directory begin with either the letter "K" or the letter "S" and are followed by a two-digit number and a filename; for example: K00lpd S00savecore S25uucp In general, the system starts commands that begin with the letter "S" and stops commands that begin with the letter "K." Commands that begin with the letter "K" run only when the system is changing run levels from a higher to a lower level. Commands that begin with the letter "S" run in all cases. The numbering of commands in the /sbin/rc2.d directory is important since the numbers are sorted and the com- mands are run in ascending order. Files in the /sbin/rc2.d directory are normally links to files in the /etc/init.d directory. An entry in the inittab file causes the system to execute the rc2 run commands, for example: s2:23:wait:/sbin/rc2 < /dev/console > /dev/console 2>&1 The following operations are typical of those that result from executing the rc2 script and the commands located in the /sbin/rc2.d direc- tory. The operation depends on which state the system is entering or exiting. Setting the time zone Checking the current run level Stop- ping network services and daemons Starting (or stopping) system services and daemons Starting the cron daemon Setting up paging and dump facilities Setting up uucp files Setting the TIMEZONE variable is one of the first operations completed by the rc2 script. This action provides the default time zone for subsequent commands. FILES
Specifies the command path Specifies the directory of commands that correspond to the run level RELATED INFORMATION
Commands: init(8), rc0(8), rc3(8) delim off rc2(8)
All times are GMT -4. The time now is 07:16 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy