Forum: CFEngine Help Subject: Re: Finding the current user running cf-agent Author: sauer Link to topic: https://cfengine.com/forum/read.php?3,23960,23963#msg-23963
You could check $(sys.workdir); if it's /var/cfengine, you're root. Otherwise, it's .cfagent under the homedir of the user. Depending on what you're trying to accomplish, this may be easier or more complicated to apply than Diego's suggestion. :) _______________________________________________ Help-cfengine mailing list Help-cfengine@cfengine.org https://cfengine.org/mailman/listinfo/help-cfengine