mirror of
https://github.com/Burnett01/rsync-deployments.git
synced 2024-11-24 00:13:46 +01:00
Remove .sh ext
This commit is contained in:
parent
539d248dc2
commit
8a8eb3a7f3
6 changed files with 34 additions and 3 deletions
|
@ -9,7 +9,7 @@ RUN rm -rf /var/cache/apk/*
|
||||||
RUN mkdir ~/.ssh
|
RUN mkdir ~/.ssh
|
||||||
|
|
||||||
# Copy in our executables.
|
# Copy in our executables.
|
||||||
COPY agent-start.sh /bin/agent-start
|
COPY agent-start /bin/agent-start
|
||||||
COPY agent-add.sh /bin/agent-add
|
COPY agent-add /bin/agent-add
|
||||||
COPY agent-stop.sh /bin/agent-stop
|
COPY agent-stop /bin/agent-stop
|
||||||
RUN chmod +x /bin/agent-start /bin/agent-stop /bin/agent-add
|
RUN chmod +x /bin/agent-start /bin/agent-stop /bin/agent-add
|
||||||
|
|
5
agent-add
Normal file
5
agent-add
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# Start the SSH agent if it isn't already.
|
||||||
|
agent-start
|
||||||
|
ssh-add "$@"
|
7
agent-start
Normal file
7
agent-start
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# Start the SSH agent if it isn't already.
|
||||||
|
if [ -z "$SSH_AGENT_PID" ]; then
|
||||||
|
eval $(ssh-agent) > /dev/null
|
||||||
|
echo "$SSH_AGENT_PID" > /tmp/ssh-agent-id
|
||||||
|
fi
|
13
agent-stop
Normal file
13
agent-stop
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
if [ ! -z "$SSH_AGENT_PID" ]; then
|
||||||
|
ssh-agent -k
|
||||||
|
exit $?
|
||||||
|
elif [ -f "/tmp/ssh-agent-id" ]; then
|
||||||
|
SSH_AGENT_PID=$(cat /tmp/ssh-agent-id)
|
||||||
|
ssh-agent -k
|
||||||
|
exit $?
|
||||||
|
else
|
||||||
|
echo "SSH_AGENT_PID not set, /tmp/ssh-agent-id doesn't exist!" 1>&2
|
||||||
|
exit 1
|
||||||
|
fi
|
3
hosts-add
Normal file
3
hosts-add
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
echo "$@" >> ~/.ssh/known_hosts
|
3
hosts-clear
Normal file
3
hosts-clear
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
truncate -s 0 ~/.ssh/known_hosts
|
Loading…
Reference in a new issue