D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
lib
/
systemd
/
system
/
Filename :
cloud-final.service
back
Copy
[Unit] Description=Execute cloud user/final scripts After=network-online.target cloud-config.service rc-local.service Wants=network-online.target cloud-config.service ConditionPathExists=!/etc/cloud/cloud-init.disabled ConditionKernelCommandLine=!cloud-init=disabled [Service] Type=oneshot ExecStart=/usr/bin/cloud-init modules --mode=final RemainAfterExit=yes TimeoutSec=0 KillMode=process # Restart NetworkManager if it is present and running. # TODO: try-reload-or-restart is available only on systemd >= 229 ExecStartPost=/bin/sh -c 'u=NetworkManager.service; \ out=$(systemctl show --property=SubState $u) || exit; \ [ "$out" = "SubState=running" ] || exit 0; \ systemctl reload-or-try-restart $u' # Output needs to appear in instance console output StandardOutput=journal+console [Install] WantedBy=cloud-init.target