Our forum is the right place for exchanging infos, searching for help or helping others. Meanwhile there are many thousand posts, so please use our 'Search' function if you are looking for a special topic. 

Because the forum is used more often for unauthorized advertising, we have decided to close it for new posts.

Who still wants to browse the old posts can do this with pleasure.

 

 

Help needed!

shell script running but not the command inside the script

Alternar
[font=Arial, "Helvetica Neue", Helvetica, sans-serif]I have a peculiar problem. Below is the shell script I am using via command-line script is working fine. But the same script when I execute via commvault post backup script is running but not executing the command inside that script. Any idea why it is not executing the command via remote execution.[font=Arial, "Helvetica Neue", Helvetica, sans-serif]
1
[color=var(--black-800)][font=Consolas, Menlo, Monaco, "Lucida Console", "Liberation Mono", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Courier New", monospace, sans-serif][size=3]more sat-stop.sh[/size][/font][/color]
1234567891011121314
[color=var(--highlight-color)][font=Consolas, Menlo, Monaco, "Lucida Console", "Liberation Mono", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Courier New", monospace, sans-serif][code][font=inherit][size=3][color=var(--highlight-keyword)][font=inherit]#!/bin/bash[/font][/color]

[color=var(--highlight-literal)][font=inherit]export[/font][/color] PATH=/sbin:/bin:/usr/sbin:/usr/bin:[color=var(--highlight-variable)][font=inherit]$HOME[/font][/color]=/root

NOW=$(date [color=var(--highlight-variable)][font=inherit]"+%Y-%m-%d-%H:%M"[/font][/color])

[color=var(--highlight-comment)][font=inherit]#Redhat 6.4[/font][/color]

foreman-maintain service  stop | tee -a /usr/[color=var(--highlight-literal)][font=inherit]local[/font][/color]/scripts/sat-stop-[color=var(--highlight-variable)][font=inherit]$NOW[/font][/color].[color=var(--highlight-literal)][font=inherit]log[/font][/color] 2>&1

sleep 30

[color=var(--highlight-literal)][font=inherit]exit[/font][/color] 0
[/size][/font]
[font=Arial, "Helvetica Neue", Helvetica, sans-serif]Thanks in advance.
0 (0 Votos)

RE: shell script running but not the command inside the script
Respuesta
14/07/22 20:18 en respuesta a prabakar reddy.
Awesome site i love it keep posting more   https://fencecompanylincolnne.net
0 (0 Votos)

Recent Bloggers Recent Bloggers

trust7
Mensajes: 39
Estrellas: 39
Fecha: 9/03/19
VAK
Mensajes: 51
Estrellas: 124
Fecha: 25/02/18
trust 7
Mensajes: 2
Estrellas: 3
Fecha: 22/01/18
Ame Elliott
Mensajes: 2
Estrellas: 2
Fecha: 21/10/17
Katja Ponert
Mensajes: 2
Estrellas: 3
Fecha: 10/11/16
Rebecca Müller
Mensajes: 1
Estrellas: 2
Fecha: 27/09/16
Andreas von der Heydt
Mensajes: 4
Estrellas: 3
Fecha: 20/10/14