mirror of
https://github.com/mtan93/Installomator.git
synced 2026-03-16 05:10:57 +00:00
SYSTEMOWNER
This commit is contained in:
@@ -392,11 +392,12 @@ installAppWithPath() { # $1: path to app to install in $targetDir
|
||||
fi
|
||||
|
||||
# set ownership to current user
|
||||
if [ "$currentUser" != "loginwindow" ]; then
|
||||
if [[ "$currentUser" != "loginwindow" && $SYSTEMOWNER -ne 1 ]]; then
|
||||
printlog "Changing owner to $currentUser"
|
||||
chown -R "$currentUser" "$targetDir/$appName"
|
||||
else
|
||||
printlog "No user logged in, not changing user"
|
||||
printlog "No user logged in or SYSTEMOWNER=1, setting owner to root:wheel"
|
||||
chown -R root:wheel "$targetDir/$appName"
|
||||
fi
|
||||
|
||||
elif [[ ! -z $CLIInstaller ]]; then
|
||||
|
||||
@@ -88,6 +88,13 @@ IGNORE_APP_STORE_APPS=no
|
||||
# Shouldn’t give any problems for the user in most cases.
|
||||
# Known bad example: Slack will loose all settings.
|
||||
|
||||
# Owner of copied apps
|
||||
SYSTEMOWNER=0
|
||||
# options:
|
||||
# - 0 Current user will be owner of copied apps, just like if they
|
||||
# installed it themselves (default).
|
||||
# - 1 root:wheel will be set on the copied app.
|
||||
# Useful for shared machines.
|
||||
|
||||
# install behavior
|
||||
INSTALL=""
|
||||
|
||||
Reference in New Issue
Block a user