Skip to content

Commit

Permalink
Fix disabling cockpit socket
Browse files Browse the repository at this point in the history
  • Loading branch information
asdf1nit committed Aug 11, 2019
1 parent a28b6f0 commit 2fa8e13
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/modules/cockpit-install/config
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
# Cockpit is a Red Hat sponsored free software project released under the LGPL v2.1+
# https://cockpit-project.org/

#disable the cockpit web socket if you already have a cockpit server setup and dont want this
#pi to have a web dashboard
# disable the cockpit web socket if you already have a cockpit server setup and dont want this
# pi to have a web dashboard. "yes" to configure
CUSTOMPIOS_DISABLE_COCKPIT_SOCKET=no
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
#!/bin/bash
# This file installs cockpit when the service cockpit_installer
# is run on the first boot. It takes close to 10 min for everything
# to finish setting up. After that you can reach your pi at
# https://pi_ip_address:9090

#DISABLE_COCKPIT_SOCKET=yes

if [ ! -f /etc/cockpit_service ]; then
apt-get install -y cockpit
touch /etc/cockpit_service
if [ "$CUSTOMPIOS_DISABLE_COCKPIT_SOCKET" == "yes" ]; then
if [ "$DISABLE_COCKPIT_SOCKET" == "yes" ]; then
systemctl disable cockpit.socket
fi
fi
4 changes: 4 additions & 0 deletions src/modules/cockpit-install/start_chroot_script
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,7 @@ unpack /filesystem/root_init /

chmod +x /home/pi/scripts/install_cockpit
systemctl enable cockpit_installer.service
if [ "$CUSTOMPIOS_DISABLE_COCKPIT_SOCKET" == 'yes' ]
then
sed -i /home/pi/scripts/install_cockpit -e "s/^#DISABLE_COCKPIT_SOCKET=yes/DISABLE_COCKPIT_SOCKET=yes/"
fi

0 comments on commit 2fa8e13

Please sign in to comment.