mirror of
https://github.com/containers/podman.git
synced 2025-12-11 17:27:19 +08:00
Merge pull request #12449 from vrothberg/fix-12438
systemd: replace multi-user with default.target
This commit is contained in:
@@ -35,7 +35,7 @@ ExecStart=/usr/bin/podman start -a redis
|
||||
ExecStop=/usr/bin/podman stop -t 10 redis
|
||||
KillMode=process
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
WantedBy=default.target
|
||||
`
|
||||
})
|
||||
|
||||
|
||||
@@ -34,6 +34,12 @@ function service_setup() {
|
||||
|
||||
systemctl daemon-reload
|
||||
|
||||
# Also test enabling services (see #12438).
|
||||
run systemctl enable "$SERVICE_NAME"
|
||||
if [ $status -ne 0 ]; then
|
||||
die "Error enabling systemd unit $SERVICE_NAME, output: $output"
|
||||
fi
|
||||
|
||||
run systemctl start "$SERVICE_NAME"
|
||||
if [ $status -ne 0 ]; then
|
||||
die "Error starting systemd unit $SERVICE_NAME, output: $output"
|
||||
@@ -53,6 +59,11 @@ function service_cleanup() {
|
||||
die "Error stopping systemd unit $SERVICE_NAME, output: $output"
|
||||
fi
|
||||
|
||||
run systemctl disable "$SERVICE_NAME"
|
||||
if [ $status -ne 0 ]; then
|
||||
die "Error disbling systemd unit $SERVICE_NAME, output: $output"
|
||||
fi
|
||||
|
||||
if [[ -z "$status" ]]; then
|
||||
run systemctl is-active "$SERVICE_NAME"
|
||||
if [ $status -ne 0 ]; then
|
||||
|
||||
@@ -366,7 +366,7 @@ Type=oneshot
|
||||
ExecStart=/usr/bin/podman auto-update
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target default.target
|
||||
WantedBy=default.target
|
||||
EOF
|
||||
|
||||
echo "podman-auto-update-$cname" >> $SNAME_FILE
|
||||
|
||||
Reference in New Issue
Block a user