diff options
author | root | 2014-06-30 15:21:04 +0200 |
---|---|---|
committer | root | 2014-06-30 15:21:04 +0200 |
commit | 9aabe45d6e2865dcc95e4a6f5823c9310904b1e9 (patch) | |
tree | 2b53f43e95d3944b73864f4e5995a75ab42a61b0 /satellit_installer/includes/10-sudo_config.inc | |
download | setup-scripts-9aabe45d6e2865dcc95e4a6f5823c9310904b1e9.tar.gz setup-scripts-9aabe45d6e2865dcc95e4a6f5823c9310904b1e9.tar.xz setup-scripts-9aabe45d6e2865dcc95e4a6f5823c9310904b1e9.zip |
[SSPS] Satellite server preparation script. Further heavy debugging needed -
this is just the first checkin after tidying to server as a starting point.
Diffstat (limited to 'satellit_installer/includes/10-sudo_config.inc')
-rw-r--r-- | satellit_installer/includes/10-sudo_config.inc | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/satellit_installer/includes/10-sudo_config.inc b/satellit_installer/includes/10-sudo_config.inc new file mode 100644 index 0000000..e952bc7 --- /dev/null +++ b/satellit_installer/includes/10-sudo_config.inc @@ -0,0 +1,20 @@ +sudo_config() { + + TM_SUDO_CONF="/etc/sudoers.d/taskmanager" + + if [ ! -e "${TM_SUDO_CONF}" ]; then + # generate it + cat > "${TM_SUDO_CONF}" <<-EOF + # Sudoers configuration for user 'taskmanager' + # Auto-generated on: $(date) + taskmanager ALL=(root) NOPASSWD: /sbin/reboot + taskmanager ALL=(ldadp) NOPASSWD: /opt/taskmanager/scripts/ldadp-launcher + taskmanager ALL=(root) NOPASSWD: /opt/taskmanager/scripts/mount-store + EOF + + chmod 0440 "${TM_SUDO_CONF}" || \ + echo "# Could not set perms of '${TM_SUDO_CONF}' to 0440!" + else + echo "# File ${TM_SUDO_CONF} exists!" + fi +} |