Skip to content

Commit

Permalink
Add a task.sh to run things when container starts
Browse files Browse the repository at this point in the history
  • Loading branch information
ofaurax committed Jul 25, 2024
1 parent 86260ec commit 89f93b5
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions task.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/bin/bash

echo "Welcome to Alloy Inband container"

alloy inband

cat <<"EOF" > /statedir/cleanup.sh
#!/usr/bin/env bash
echo "This is the cleanup script.sh"
for i in {1..10}
do
echo $i
sleep 1
done
reboot
EOF
chmod +x /statedir/cleanup.sh

echo "task.sh is now finished, cleanup.sh will reboot after 10s"

0 comments on commit 89f93b5

Please sign in to comment.