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) uninstall)
exec ./lib/remove-bridgehead-units.sh $PROJECT exec ./lib/remove-bridgehead-units.sh $PROJECT
;; ;;
fixPermissions)
chown -R bridgehead /etc/bridgehead .
;;
*) *)
printUsage printUsage
exit 1 exit 1

View File

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

View File

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