summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--google-startup-scripts/usr/lib/systemd/system-preset/50-google.preset3
-rw-r--r--google-startup-scripts/usr/lib/systemd/system/google-shutdown-scripts.service12
-rw-r--r--google-startup-scripts/usr/lib/systemd/system/google-startup-scripts.service5
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