Migration Guide

This page highlights significant changes from E12s running Ubuntu 14.04 LTS to E12s running Ubuntu 22.04 LTS.

Init System: systemd

Ubuntu 14.04 LTS used Upstart as its init system. Later versions use systemd. Though a full systemd manual is beyond the scope of this document, Ubuntu does provide some useful information:

systemd for Upstart Users

Example UserMain.py service

Below is an example of a systemd service which runs the /home/snap/UserMain.py script as the snap user.

[Unit]
Description=UserMain

[Service]
Type=simple
User=snap
Group=snap
ExecStart=/usr/bin/python2 /home/snap/UserMain.py
Restart=always

[Install]
WantedBy=default.target

This systemd unit might live in /etc/systemd/system/usermain.service. After creating this file, you would need to reload the config, enable the service (so it would run on subsequent boots), and start the service:

$ sudo systemctl daemon-reload
$ sudo systemctl enable usermain
$ sudo systemctl start usermain

By default, output from your service will be captured in the systemd journal. To see the journal for this service:

$ sudo journalctl -u usermain

Python versions:

Ubuntu 14.04 LTS provided Python 2.7.6, 3.4, and 3.6.

Ubuntu 22.04 LTS provides Python 2.7.18 and 3.10.4.

See What’s new in Python for details of changes between Python versions.