Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch blueos-bootstrap from rc.local to systemd #2979

Merged
merged 3 commits into from
Oct 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions install/configs/blueos.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[Unit]
Description=Start BlueOS on boot

[Service]
Type=oneshot
ExecStart=/usr/bin/docker start blueos-bootstrap

[Install]
WantedBy=multi-user.target
10 changes: 8 additions & 2 deletions install/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -226,8 +226,14 @@ docker create \
-e BLUEOS_CONFIG_PATH=$HOME/.config/blueos \
$BLUEOS_BOOTSTRAP

# add docker entry to rc.local
sed -i "\%^exit 0%idocker start blueos-bootstrap" /etc/rc.local || echo "Failed to add docker start on rc.local, BlueOS will not start on boot!"
# Ensure docker can run without sudo
groupadd docker || true
usermod -aG docker pi || true

# Create service to start blueos-bootstrap container on boot
curl -fsSL "$ROOT/install/configs/blueos.service" -o /etc/systemd/system/blueos.service
systemctl start blueos
systemctl enable blueos

# Configure network settings
## This should be after everything, otherwise network problems can happen
Expand Down