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

Umschalten
[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 Stimmen)

RE: shell script running but not the command inside the script
Antwort
14.07.22 20:18 als Antwort auf prabakar reddy.
Awesome site i love it keep posting more   https://fencecompanylincolnne.net
0 (0 Stimmen)

Recent Bloggers Recent Bloggers

trust7
Beiträge: 39
Sterne: 39
Datum: 09.03.19
VAK
Beiträge: 51
Sterne: 124
Datum: 25.02.18
trust 7
Beiträge: 2
Sterne: 3
Datum: 22.01.18
Ame Elliott
Beiträge: 2
Sterne: 2
Datum: 21.10.17
Katja Ponert
Beiträge: 2
Sterne: 3
Datum: 10.11.16
Rebecca Müller
Beiträge: 1
Sterne: 2
Datum: 27.09.16
Andreas von der Heydt
Beiträge: 4
Sterne: 3
Datum: 20.10.14