diff options
author | Jonas Gunz <himself@jonasgunz.de> | 2020-06-01 22:14:26 +0200 |
---|---|---|
committer | Jonas Gunz <himself@jonasgunz.de> | 2020-06-01 22:14:26 +0200 |
commit | a1f34001696c44139b668918ea52c1add0dde7ea (patch) | |
tree | af4ea86dfe4ac5a696e3c9eb43935ab9ebb063d4 /tasks | |
parent | f33ea96125c63e112cbef97de3b8376a38681e40 (diff) | |
download | ltask-a1f34001696c44139b668918ea52c1add0dde7ea.tar.gz |
fixed include system, updated some tasks
Diffstat (limited to 'tasks')
-rw-r--r-- | tasks/initial-user-setup | 2 | ||||
-rw-r--r-- | tasks/jenkins (renamed from tasks/apt-update) | 11 | ||||
-rw-r--r-- | tasks/system-update (renamed from tasks/update) | 18 |
3 files changed, 21 insertions, 10 deletions
diff --git a/tasks/initial-user-setup b/tasks/initial-user-setup index de3aee9..68a0d2a 100644 --- a/tasks/initial-user-setup +++ b/tasks/initial-user-setup @@ -5,7 +5,7 @@ function task_setup() { SSH_IDENTITY_FILE=$ASSET_DIR/id_jenkins FILES+=("$ASSET_DIR/id_user.pub" "$ASSET_DIR/id_jenkins.pub") - INCLUDES+=("pkgmanager") + INCLUDES+=("$INCLUDE_DIR/pkgmanager") TASK_ISSET="yes" } diff --git a/tasks/apt-update b/tasks/jenkins index 38693b3..5598a9e 100644 --- a/tasks/apt-update +++ b/tasks/jenkins @@ -1,8 +1,9 @@ #!/bin/bash function task_exec() { - sudo apt-get -y update - sudo apt-get -y upgrade + + cat id_jenkins.pub >> /home/server/.ssh/authorized_keys + } function task_setup() { @@ -11,8 +12,10 @@ function task_setup() { # $TOOL_DIR SSH_USER=server - SSH_IDENTITY_FILE=$ASSET_DIR/id_rsa - + SSH_IDENTITY_FILE=$ASSET_DIR/id_jenkins + + FILES+=("$ASSET_DIR/id_jenkins.pub") + TASK_ISSET="yes" } diff --git a/tasks/update b/tasks/system-update index e392b76..8244ca4 100644 --- a/tasks/update +++ b/tasks/system-update @@ -1,18 +1,26 @@ #!/bin/bash function task_exec() { - pkg_update - pkg_upgrade + ret=0 + sudo pkg_update + ret=$(($ret + $?)) + + sudo pkg_upgrade + ret=$(($ret + $?)) + + exit $ret } function task_setup() { + # Available environment variables + # $ASSET_DIR + # $TOOL_DIR + INCLUDES+=("$INCLUDE_DIR/pkgmanager") SSH_USER=server - #SSH_IDENTITY_FILE=$ASSET_DIR/id_rsa + SSH_IDENTITY_FILE=$ASSET_DIR/id_jenkins - FILES+=() - TASK_ISSET="yes" } |