In snappy Ubuntu core, Autoupilot is a feature of it. As long as the autopilot feature is on, and our snappy device is networked, it can automatically connect and update our snappy Ubuntu Core. This autopilot switch is on by default. We can set it up by Snappy Config.
We can view its current settings with the following command: Method 1
(AMD64) ubuntu@localhost:~$ Snappy Config Ubuntu-core | grep autopilot
autopilot:true
We can see that its current switch is on, which means that our snappy system will automatically update our system in the case of networking.
(AMD64) ubuntu@localhost:~$ sudo systemctl stop Snappy-autopilot.timer
(AMD64) ubuntu@localhost:~$ sudo systemctl Disable Snappy-autopilot.timer
removed symlink/etc/systemd/system/multi-user.target.wants/ Snappy-autopilot.timer.
(AMD64) ubuntu@localhost:~$ Snappy Config Ubuntu-core | grep AutoUpdate
(AMD64) ubuntu@localhost:~$ snappy Config Ubuntu-core | grep autopilot
autopilot:false
If we just want to turn it off temporarily, we can use stop instead of the Disable.
We can re-open this switch in the following way:
(AMD64) ubuntu@localhost:~$ sudo systemctl enable Snappy-autopilot.timer
Created symlink from/etc/systemd/system/ Multi-user.target.wants/snappy-autopilot.timer To/lib/systemd/system/snappy-autopilot.timer.
(AMD64) ubuntu@localhost:~$ sudo systemctl start Snappy-autopilot.timer
(AMD64) ubuntu@localhost:~$ Snappy Config Ubuntu-core | grep autopilot
autopilot:true
Please see the article "Autopilot mode" for more information. Method 2
Another approach is to use the following approach:
$ snappy Config Ubuntu-core > My.yaml
We then modify the "autopilot" entry to the value we want, and then enter the following command:
$ sudo snappy config Ubuntu-core my.yaml
Method 3
$ Echo ' config: {ubuntu-core: {autopilot:off}} ' | sudo snappy config Ubuntu-core-
The above command will turn off autopilot
$ echo ' config: {ubuntu-core: {autopilot:on}} ' | sudo snappy config ubuntu-core-
The above command will open the autopilot switch
We can check the current state by the following method:
$ snappy Config Ubuntu-core | grep autopilot