Merge pull request #21 from samply/feature/fixPermissions

Fix permissions on startup. Requires re-install of systemd units.
This commit is contained in:
Martin Lablans 2022-10-06 09:08:45 +02:00 committed by GitHub
commit 945a862a68
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 0 deletions

View File

@ -65,6 +65,9 @@ case "$ACTION" in
uninstall)
exec ./lib/remove-bridgehead-units.sh $PROJECT
;;
fixPermissions)
chown -R bridgehead /etc/bridgehead .
;;
*)
printUsage
exit 1

View File

@ -4,6 +4,7 @@ Description=Bridgehead (%i) Update Service
[Service]
Type=oneshot
User=bridgehead
ExecStartPre=-/srv/docker/bridgehead/bridgehead fixPermissions %i
ExecStart=/srv/docker/bridgehead/bridgehead update %i
[Install]

View File

@ -6,6 +6,7 @@ Requires=docker.service
User=bridgehead
Restart=always
RestartSec=30
ExecStartPre=-/srv/docker/bridgehead/bridgehead fixPermissions %i
ExecStart=/srv/docker/bridgehead/bridgehead start %i
ExecStop=/srv/docker/bridgehead/bridgehead stop %i