mirror of
https://github.com/mtan93/Installomator.git
synced 2026-04-11 22:05:02 +01:00
SYSTEMOWNER
This commit is contained in:
@@ -392,11 +392,12 @@ installAppWithPath() { # $1: path to app to install in $targetDir
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# set ownership to current user
|
# set ownership to current user
|
||||||
if [ "$currentUser" != "loginwindow" ]; then
|
if [[ "$currentUser" != "loginwindow" && $SYSTEMOWNER -ne 1 ]]; then
|
||||||
printlog "Changing owner to $currentUser"
|
printlog "Changing owner to $currentUser"
|
||||||
chown -R "$currentUser" "$targetDir/$appName"
|
chown -R "$currentUser" "$targetDir/$appName"
|
||||||
else
|
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
|
fi
|
||||||
|
|
||||||
elif [[ ! -z $CLIInstaller ]]; then
|
elif [[ ! -z $CLIInstaller ]]; then
|
||||||
|
|||||||
@@ -88,6 +88,13 @@ IGNORE_APP_STORE_APPS=no
|
|||||||
# Shouldn’t give any problems for the user in most cases.
|
# Shouldn’t give any problems for the user in most cases.
|
||||||
# Known bad example: Slack will loose all settings.
|
# 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 behavior
|
||||||
INSTALL=""
|
INSTALL=""
|
||||||
|
|||||||
Reference in New Issue
Block a user