From ce879bd8fe3ebab10b32cb08c2d0d4e8d750306c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Sun, 26 Aug 2018 19:52:08 +0200 Subject: Add crontab --- crontab | 2 ++ ssh-hook.sh | 6 +++++- 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 crontab diff --git a/crontab b/crontab new file mode 100644 index 0000000..c4f716e --- /dev/null +++ b/crontab @@ -0,0 +1,2 @@ +0 2 * * * laminarc turris3x-omnia +0 2 * * * laminarc turris3x-turris 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" -- cgit v1.2.3