-1

The script:

#!/bin/sh

scp /conf/acme/* gentooserver:/etc/ssl/apache2/
scp /conf/acme/* octopi:/etc/ssl/ 

When I execute it, I get output indicating at least the first command executes. (Plus the script has worked before when it was just the first line). But if I look in octopi:/etc/ssl/, the files aren't there.

If I just execute scp /conf/acme/* octopi:/etc/ssl/ on the command line, the files copy fine.

Why does this command not work from inside a shell script?

2 Answers 2

0

Posting as answer since I can't comment.

Add -v on your scp invocations to see verbose output that might indicate the issue. You might also try rsync -v ... if the output from scp -v ... isn't helpful.

-1

Alright, so I logged back in, and the file lacked the second line, as though I never added it? Even though I opened and closed vi several times during the last session and the line was there.

I don't know how to use vi, so I just installed nano and edited the file properly. It works now.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.