github.com/bugraaydogar/snapd@v0.0.0-20210315170335-8c70bb858939/data/systemd/snapd.system-shutdown.service.in (about)

     1  [Unit]
     2  Description=Ubuntu core (all-snaps) system shutdown helper setup service
     3  Before=umount.target
     4  DefaultDependencies=false
     5  # don't run on classic
     6  ConditionKernelCommandLine=|snap_core
     7  ConditionKernelCommandLine=|snapd_recovery_mode
     8  ConditionPathExists=!/usr/bin/finalrd
     9  # don't run if system-shutdown isn't there
    10  ConditionPathExists=@libexecdir@/snapd/system-shutdown
    11  # X-Snapd-Snap: do-not-start
    12  
    13  [Service]
    14  Type=oneshot
    15  ExecStart=/bin/mount /run -o remount,exec
    16  ExecStart=/bin/mkdir -p /run/initramfs
    17  ExecStart=/bin/cp @libexecdir@/snapd/system-shutdown /run/initramfs/shutdown
    18  
    19  [Install]
    20  WantedBy=final.target