Fix permissions on startup. Requires re-install of systemd units.

This commit is contained in:
Martin Lablans 2022-10-05 19:58:07 +02:00
parent 9f541cd9b5
commit b41e5b2315
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