Skip to content

Commit

Permalink
Merge pull request #91 from thin-edge/chore-remove-unused-code
Browse files Browse the repository at this point in the history
chore: remove old setup and bootstrapping logic
  • Loading branch information
reubenmiller authored Oct 3, 2024
2 parents 23a21aa + c81974c commit 007c5c9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 13 deletions.
11 changes: 0 additions & 11 deletions images/common/bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ USE_RANDOM_ID=${USE_RANDOM_ID:-0}
SHOULD_PROMPT=${SHOULD_PROMPT:-1}
CAN_PROMPT=0
UPLOAD_CERT_WAIT=${UPLOAD_CERT_WAIT:-1}
CONFIGURE_TEST_SETUP=${CONFIGURE_TEST_SETUP:-1}
TEST_USER=${TEST_USER:-iotadmin}
PREFIX=${PREFIX:-tedge_}
C8Y_BASEURL=${C8Y_BASEURL:-}
Expand Down Expand Up @@ -414,16 +413,6 @@ main() {
# ---------------------------------------
# Post setup
# ---------------------------------------
if [ "$CONFIGURE_TEST_SETUP" = 1 ]; then
# Add additional tools
if command_exists systemctl; then
if [ -d /run/systemd/system ]; then
sudo systemctl restart tedge-agent
sudo systemctl restart c8y-firmware-plugin
fi
fi
fi

# Run optional post bootstrap scripts
if [ -d "$BOOTSTRAP_POSTINST_DIR" ]; then
for script in "$BOOTSTRAP_POSTINST_DIR"/*.sh; do
Expand Down
9 changes: 7 additions & 2 deletions images/common/optional-installer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,13 @@ configure_users() {

configure_services() {
if command_exists systemctl; then
sudo systemctl enable ssh
sudo systemctl enable tedge-mapper-collectd
if sudo systemctl list-unit-files ssh.service >/dev/null >&2; then
sudo systemctl enable ssh.service
fi

if sudo systemctl list-unit-files tedge-mapper-collectd.service >/dev/null >&2; then
sudo systemctl enable tedge-mapper-collectd.service
fi
fi
}

Expand Down

3 comments on commit 007c5c9

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Robot Results

✅ Passed ❌ Failed ⏭️ Skipped Total Pass % ⏱️ Duration
11 0 2 11 100 48.124999999s

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Robot Results

✅ Passed ❌ Failed ⏭️ Skipped Total Pass % ⏱️ Duration
7 0 0 7 100 45.898s

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Robot Results

✅ Passed ❌ Failed ⏭️ Skipped Total Pass % ⏱️ Duration
14 0 0 14 100 1m4.184s

Please sign in to comment.