diff options
author | Karel Kočí <cynerd@email.cz> | 2018-08-26 19:52:08 +0200 |
---|---|---|
committer | Karel Kočí <cynerd@email.cz> | 2018-08-26 19:52:08 +0200 |
commit | ce879bd8fe3ebab10b32cb08c2d0d4e8d750306c (patch) | |
tree | 8ff8ceda6e137d16a0db21b6307bce5ae2742a4a /ssh-hook.sh | |
parent | 656af2f7cc1ddd3ecb11aa3a2d6424b2f89bf684 (diff) | |
download | laminar-cnf-ce879bd8fe3ebab10b32cb08c2d0d4e8d750306c.tar.gz laminar-cnf-ce879bd8fe3ebab10b32cb08c2d0d4e8d750306c.tar.bz2 laminar-cnf-ce879bd8fe3ebab10b32cb08c2d0d4e8d750306c.zip |
Add crontab
Diffstat (limited to 'ssh-hook.sh')
-rwxr-xr-x | ssh-hook.sh | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/ssh-hook.sh b/ssh-hook.sh index 4aac748..3643a2a 100755 --- a/ssh-hook.sh +++ b/ssh-hook.sh @@ -2,8 +2,9 @@ # Fetch cnf in build and export ssh config if [ -z "$SSH_ORIGINAL_COMMAND" ]; then - echo "Pull Laminar config" cd "$(dirname "$(readlink -f "$0")")" + + echo "Pull Laminar config" git fetch --prune --force git reset --hard origin/master @@ -11,6 +12,9 @@ if [ -z "$SSH_ORIGINAL_COMMAND" ]; then cp ssh/config ~/.ssh/config cp ssh/authorized_keys ~/.ssh/authorized_keys + echo "Set crontab" + crontab crontab + else echo "Laminar queue: $SSH_ORIGINAL_COMMAND" |