Skip to content

Commit 93677e1

Browse files
committed
Run bosh-enable-monit-access as vcap if called by root
Rules for root are already set by bosh agent. Set for vcap user for backwards compatiblity with old releases
1 parent ce4e74b commit 93677e1

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed
Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
11
permit_monit_access() {
2-
/var/vcap/bosh/etc/bosh-enable-monit-access
2+
if [ "$(id -u)" -eq 0 ]; then
3+
sudo -u vcap /var/vcap/bosh/etc/bosh-enable-monit-access
4+
else
5+
/var/vcap/bosh/etc/bosh-enable-monit-access
6+
fi
37
}

0 commit comments

Comments
 (0)