# Service files (Unit files) are in the "/etc/systemd/system/" and "/usr/lib/systemd/system/autovt@.service" directories. But the first directory contains links to the service files in the second directory. Thus, service files get from the second directory.
# There is no "/usr/lib/systemd/system/" on some ARM systems and "/lib/systemd/system/" is used in this case. "/usr/lib/systemd/system/" is a symlink to "/lib/systemd/system/".
# There is no "/usr/lib/systemd/system/" on some ARM systems (and also on older distributions) and "/lib/systemd/system/" is used in this case. On newer distributions "/usr/lib/systemd/system/" is a symlink to "/lib/systemd/system/".
# On ARM systems, also "/usr/lib/systemd/system/" folder may be used after installling some applications. In this situation this folder will be a real path.
service_unit_file_list_usr_lib_systemd=[filenameforfilenameinos.listdir(service_unit_files_dir)iffilename.endswith(".service")]# Get file names which ends withs ".service".
service_unit_file_list_lib_systemd=[filenameforfilenameinos.listdir(service_unit_files_dir)iffilename.endswith(".service")]# Get file names which ends withs ".service".
# Merge service file lists from different folders.
service_unit_file_list=[filenameforfilenameinos.listdir(service_unit_files_dir)iffilename.endswith(".service")]# Get file names which ends withs ".service".
try:
service_files_from_run_systemd_list=[filename.split("invocation:",1)[1]forfilenameinos.listdir("/run/systemd/units/")]# "/run/systemd/units/" directory contains loaded and non-dead services.