Skip to content

Commit

Permalink
🎉 add updater service to linux install script (#402)
Browse files Browse the repository at this point in the history
Signed-off-by: Patrick Münch <[email protected]>
  • Loading branch information
atomic111 authored Dec 23, 2023
1 parent fc9511a commit 8af0eed
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -626,12 +626,12 @@ EOL
elif [ "$OS" = "Arch" ]; then
purple_bold "\n* Enable and start the mondoo service"
sudo_cmd systemctl enable mondoo.service
sudo_cmd systemctl start mondoo.service
sudo_cmd systemctl restart mondoo.service
sudo_cmd systemctl daemon-reload
else
purple_bold "\n* Enable and start the cnspec service"
sudo_cmd systemctl enable cnspec.service
sudo_cmd systemctl start cnspec.service
sudo_cmd systemctl restart cnspec.service
sudo_cmd systemctl daemon-reload
fi
}
Expand Down Expand Up @@ -681,8 +681,13 @@ EOL
sleep 5
sudo_cmd launchctl load /Library/LaunchDaemons/com.mondoo.autoupdater.plist
sudo_cmd launchctl start /Library/LaunchDaemons/com.mondoo.autoupdater.plist
else
echo $'#!/bin/sh\nbash -c "$(curl -sSL https://install.mondoo.com/sh)"' > /etc/cron.weekly/mondoo-update
elif [ "$OS" = "RedHat" ] || [ "$OS" = "Debian" ] || [ "$OS" = "Suse" ]; then
sudo_cmd tee /etc/cron.weekly/mondoo-update <<EOL
#!/bin/sh
date > /var/log/mondoo-updater.log
curl -sSL https://install.mondoo.com/sh | bash -s -- -s enable >> /var/log/mondoo-updater.log
EOL
sudo_cmd chmod a+x /etc/cron.weekly/mondoo-update
fi
}

Expand Down

0 comments on commit 8af0eed

Please sign in to comment.