Unfortunately, we cannot support docker snap installations, cf. https://askubuntu.com/questions/1374480/docker-compose-installed-with-snap-gives-error-on-yml-file
This reverts commit 292d71b6c2
.
This commit is contained in:
parent
292d71b6c2
commit
5e31da5139
|
@ -11,22 +11,6 @@ detectCompose() {
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# https://unix.stackexchange.com/questions/539147
|
|
||||||
systemctl-exists() {
|
|
||||||
[ $(systemctl list-unit-files "${1}*" | wc -l) -gt 3 ]
|
|
||||||
}
|
|
||||||
|
|
||||||
dockerUnitName() {
|
|
||||||
if systemctl-exists docker.service; then
|
|
||||||
echo "docker.service"
|
|
||||||
elif systemctl-exists snap.docker.dockerd.service; then
|
|
||||||
echo "snap.docker.dockerd.service"
|
|
||||||
else
|
|
||||||
log ERROR "Unable to detect docker systemd unit."
|
|
||||||
fail_and_report 1 "Unable to detect docker systemd unit."
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
exitIfNotRoot() {
|
exitIfNotRoot() {
|
||||||
if [ "$EUID" -ne 0 ]; then
|
if [ "$EUID" -ne 0 ]; then
|
||||||
log "ERROR" "Please run as root"
|
log "ERROR" "Please run as root"
|
||||||
|
|
|
@ -40,12 +40,6 @@ cp -v \
|
||||||
lib/systemd/bridgehead-update\@.timer \
|
lib/systemd/bridgehead-update\@.timer \
|
||||||
/etc/systemd/system/
|
/etc/systemd/system/
|
||||||
|
|
||||||
log INFO "Setting Docker unit ..."
|
|
||||||
|
|
||||||
for file in $(find /etc/systemd/system -mindepth 1 -maxdepth 1 -type f -name "bridgehead*"); do
|
|
||||||
sed -i "s/DOCKER_UNIT_NAME/$(dockerUnitName)/g" $file
|
|
||||||
done
|
|
||||||
|
|
||||||
systemctl daemon-reload
|
systemctl daemon-reload
|
||||||
|
|
||||||
log INFO "Trying to update your bridgehead ..."
|
log INFO "Trying to update your bridgehead ..."
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
[Unit]
|
[Unit]
|
||||||
Description=Bridgehead (%i)
|
Description=Bridgehead (%i)
|
||||||
Requires=DOCKER_UNIT_NAME
|
Requires=docker.service
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
User=bridgehead
|
User=bridgehead
|
||||||
|
|
Loading…
Reference in New Issue