diff options
author | Max Illfelder <illfelder@users.noreply.github.com> | 2016-01-28 20:26:49 -0500 |
---|---|---|
committer | Max Illfelder <illfelder@users.noreply.github.com> | 2016-01-28 20:26:49 -0500 |
commit | ae0b23320d600cb6030342c7ec4f15ad112e7c8b (patch) | |
tree | 7a193e3318befaa6bc11847ab63c1219b9fea9f2 | |
parent | 140548b61880665b13c208b2a3294c2fb649208e (diff) | |
parent | ec26cced8d03ae1b6a0e99f3da053f471f0508e2 (diff) | |
download | google-compute-image-packages-ae0b23320d600cb6030342c7ec4f15ad112e7c8b.tar.gz |
Merge pull request #200 from illfelder/master
New service for shutdown scripts on systemd.
3 files changed, 15 insertions, 5 deletions
diff --git a/google-startup-scripts/usr/lib/systemd/system-preset/50-google.preset b/google-startup-scripts/usr/lib/systemd/system-preset/50-google.preset index 4e85a42..f981a63 100644 --- a/google-startup-scripts/usr/lib/systemd/system-preset/50-google.preset +++ b/google-startup-scripts/usr/lib/systemd/system-preset/50-google.preset @@ -1,2 +1,3 @@ -enable google-startup-scripts.service enable google.service +enable google-shutdown-scripts.service +enable google-startup-scripts.service diff --git a/google-startup-scripts/usr/lib/systemd/system/google-shutdown-scripts.service b/google-startup-scripts/usr/lib/systemd/system/google-shutdown-scripts.service new file mode 100644 index 0000000..039ee46 --- /dev/null +++ b/google-startup-scripts/usr/lib/systemd/system/google-shutdown-scripts.service @@ -0,0 +1,12 @@ +[Unit] +Description=Google Compute Engine user shutdown scripts +Before=shutdown.target +DefaultDependencies=false +Wants=local-fs.target network-online.target network.target + +[Service] +ExecStart=/usr/share/google/run-shutdown-scripts +Type=oneshot + +[Install] +WantedBy=shutdown.target diff --git a/google-startup-scripts/usr/lib/systemd/system/google-startup-scripts.service b/google-startup-scripts/usr/lib/systemd/system/google-startup-scripts.service index 6e87f59..272be3c 100644 --- a/google-startup-scripts/usr/lib/systemd/system/google-startup-scripts.service +++ b/google-startup-scripts/usr/lib/systemd/system/google-startup-scripts.service @@ -1,15 +1,12 @@ [Unit] -Description=Google Compute Engine user scripts +Description=Google Compute Engine user startup scripts After=local-fs.target network-online.target network.target After=google.service rsyslog.service Wants=local-fs.target network-online.target network.target [Service] ExecStart=/usr/share/google/run-startup-scripts -ExecStop=/usr/share/google/run-shutdown-scripts Type=oneshot -RemainAfterExit=true -TimeoutStopSec=0 [Install] WantedBy=multi-user.target |