Sponsored Content
Top Forums Shell Programming and Scripting Need script to restart the services Post 302701427 by bapu1981 on Sunday 16th of September 2012 03:41:25 AM
Old 09-16-2012
Need script to restart the services

Hi Guys,

I need bash script to restart the service.

1. Disable the service called SASM

svcadm disable sasm

2. if service went to maintenance mode then it shuld clear it with below command

svcadm clear sasm

3.or else it should restart the mysql service

/etc/init.d/mysql stop
/etc/init.d/mysql start

4. finally start the SASM

svcadm enable sasm
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Restart Script

Hi, I am writing a script and need to goto the start of the script if an incorrect command is wrongly entered what can i do. Andy (1 Reply)
Discussion started by: chapmana
1 Replies

2. Shell Programming and Scripting

Any Restart Script?

Hi, I would like to check if there's any sample of restart script for my AIX server. I'm planning to restart it every month. Thanks. (5 Replies)
Discussion started by: ademah
5 Replies

3. Shell Programming and Scripting

How to restart a script?

Hello, I created a shell script in /etc/init.d and it already runs at boot. However I cannot figure out how to make it run just like typing "scrip_name start" I can run it like this ./script_name but since I am doing remote log in whenever I log off the script stops and I also don't want to run... (8 Replies)
Discussion started by: kizofilax
8 Replies

4. UNIX for Advanced & Expert Users

Opinion on auto-restart of failed apps/services

I'm becoming a dying breed where I work. More and more sys admins are advocating automatically restarting failed services such as tomcat, jboss, etc. I've always been against doing this except with buggy apps that can't be fixed or avoided. My main argument is that I feel it's a trick used by... (9 Replies)
Discussion started by: mglenney
9 Replies

5. AIX

problem to restart services from /etc/inittab in AIX6.1

hello, i have an AIX6.1.7.2 machine that it was upgraded recently from AIX5.3.9.4. when i kill system services that should restart automatically like /usr/sbin/cron it doesnt start. i checked my /etc/inittab file and i confirmed that this service is in respawn status so when i kill this process... (2 Replies)
Discussion started by: omonoiatis9
2 Replies

6. Shell Programming and Scripting

Script to restart process

HI, I am trying to write a scrip which would restart active process. This is what i have written till now. $ xms show pr PRESE.* NAME STATUS ROLE PID RSTRTS STARTED MACHINE... (8 Replies)
Discussion started by: Siddheshk
8 Replies

7. Red Hat

Restart of services if port no is changed in /etc/services in RHEL

I had a doubt if any services need to be restarted if port no in /etc/services in an RHEL setup is changed. For eg, the port no of 443 for SSL may need to be changed. I hope my query is clear whether any services need to be restarted if port no in /etc/services is changed. Please revert with... (10 Replies)
Discussion started by: RHCE
10 Replies

8. Shell Programming and Scripting

Script will keep checking running status of another script and also restart called script at night

I am using blow script :-- #!/bin/bash FIND=$(ps -elf | grep "snmp_trap.sh" | grep -v grep) #check snmp_trap.sh is running or not if then # echo "process found" exit 0; else echo "process not found" exec /home/Ketan_r /snmp_trap.sh 2>&1 & disown -h ... (1 Reply)
Discussion started by: ketanraut
1 Replies

9. Shell Programming and Scripting

Script to Start services based on dependent services on other AIX machine

Hi, I just started working on a script. After my research, i found a command which can help me: AIM: To build a script which starts the services (Services 1) on server 1 automatically whenever its down. And it has a dependency on other service (Service 2) on Server 2. So my script has to... (4 Replies)
Discussion started by: draghun9
4 Replies

10. Debian

How do i correct restart network-services in Debian?

Hello, I would like to do follow steps. Set a static IP-Adress on eth0 (For Testing) Set DHCP on eth0 All steps should be done without a single reboot. /etc/network/interfaces iface eth0 inet static address 192.0.2.7/24 gateway 192.0.2.254How do i perform... (3 Replies)
Discussion started by: int3g3r
3 Replies
slpd(1M)						  System Administration Commands						  slpd(1M)

NAME
slpd - Service Location Protocol Daemon SYNOPSIS
/usr/lib/inet/slpd [-f configuration-file] DESCRIPTION
The slpd daemon provides common server functionality for the Service Location Protocol ("SLP") versions 1 and 2, as defined by IETF in RFC 2165 and RFC 2608. SLP provides a scalable framework for the discovery and selection of network services. slpd provides the following framework services: Directory Agent This service automatically caches service advertisements from service agents to provide them to user agents, and makes directory agent advertisements of its services. This service is optional. slpd does not provide directory agent service by default. Directory agents are not databases, and they do not need to be maintained. Service Agent Server All service agents on the local host register and deregister with this server. This service responds to all requests for services, and forwards registrations to directory agents. By default, slpd is a service agent server. Passive Directory Agent DiscoverThis service listens for directory agent advertisements and maintains a table of active directory agents. When a user agent wishes to discover a directory agent, it can simply query slpd, obviating the need to perform discovery by means of multicast. By default, slpd performs this service. Proxy Registration This service can act as a proxy service agent for services that cannot register themselves. slpd reads the proxy registration file for information on services it is to proxy. By default, no services are registered by proxy. All configuration options are available from the configuration file. slpd reads its configuration file upon startup. Stop and start the slpd daemon using svcadm(1M). Use the command svcadm enable network/slp to start the slpd daemon. Use the command svcadm disable network/slp to stop it. The file /etc/inet/slp.conf must exist before the slp service can start the daemon. Only the example file /etc/inet/slp.conf.example is present by default. To enable SLP, copy /etc/inet/slp.conf.example to /etc/inet/slp.conf. OPTIONS
The following options are supported: -f configuration-file Specify an alternate configuration file EXAMPLES
Example 1: Stopping the slpd daemon The following command stops the slpd daemon: example# svcadm disable network/slp Example 2: Restarting the slpd daemon The following command restarts the slpd daemon: example# svcadm restart network/slp FILES
/etc/inet/slp.conf The default configuration file slpd.reg The proxy registration file ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWslpu, SUNWslpr | +-----------------------------+-----------------------------+ |CSI |Enabled | +-----------------------------+-----------------------------+ |Interface Stability | Evolving | +-----------------------------+-----------------------------+ SEE ALSO
svcs(1), svcadm(1M), slp_api(3SLP), slp.conf(4), slpd.reg(4), attributes(5), smf(5), slp(7P) System Administration Guide: Network Services Guttman, E., Perkins, C., Veizades, J., and Day, M., RFC 2608, Service Location Protocol, Version 2, The Internet Society, June 1999. NOTES
The slpd service is managed by the service management facility, smf(5), under the service identifier: svc:/network/slp Administrative actions on this service, such as enabling, disabling, or requesting restart, can be performed using svcadm(1M). The ser- vice's status can be queried using the svcs(1) command. SunOS 5.10 23 Aug 2004 slpd(1M)
All times are GMT -4. The time now is 01:11 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy