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. Before you post, you have to register with a valid email address.

Help needed!

shell script running but not the command inside the script

Threads [ Previous | Next ]
[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 Votes)

Recent Bloggers Recent Bloggers

trust7
Posts: 39
Stars: 38
Date: 3/9/19
VAK
Posts: 51
Stars: 124
Date: 2/25/18
trust 7
Posts: 2
Stars: 3
Date: 1/22/18
Ame Elliott
Posts: 2
Stars: 2
Date: 10/21/17
Katja Ponert
Posts: 2
Stars: 3
Date: 11/10/16
Rebecca Müller
Posts: 1
Stars: 2
Date: 9/27/16
Andreas von der Heydt
Posts: 4
Stars: 3
Date: 10/20/14