diff options
author | Simon Rettberg | 2014-11-27 13:40:04 +0100 |
---|---|---|
committer | Simon Rettberg | 2014-11-27 13:40:04 +0100 |
commit | 6d89447e081e57e46db72d4c3c203a4458d79c10 (patch) | |
tree | 3966b516317990aaa2e3e4ba83166abd2118b38e | |
parent | [SSPS] Install both, syslinux6 and syslinux4+ipxe (diff) | |
download | setup-scripts-6d89447e081e57e46db72d4c3c203a4458d79c10.tar.gz setup-scripts-6d89447e081e57e46db72d4c3c203a4458d79c10.tar.xz setup-scripts-6d89447e081e57e46db72d4c3c203a4458d79c10.zip |
[SSPS] Add slxlog script
-rw-r--r-- | satellit_installer/includes/10-sudo_config.inc | 1 | ||||
-rw-r--r-- | satellit_installer/includes/50-copyscripts.inc | 7 | ||||
-rwxr-xr-x | satellit_installer/satellit_installer | 1 | ||||
-rwxr-xr-x | satellit_installer/static_files/slxlog | 6 |
4 files changed, 15 insertions, 0 deletions
diff --git a/satellit_installer/includes/10-sudo_config.inc b/satellit_installer/includes/10-sudo_config.inc index baa6cea..0794aab 100644 --- a/satellit_installer/includes/10-sudo_config.inc +++ b/satellit_installer/includes/10-sudo_config.inc @@ -13,6 +13,7 @@ sudo_config() { taskmanager ALL=(root) NOPASSWD: /opt/taskmanager/scripts/system-backup taskmanager ALL=(root) NOPASSWD: /opt/taskmanager/scripts/system-restore taskmanager ALL=(root) NOPASSWD: /opt/taskmanager/scripts/install-https + ALL ALL=(www-data) NOPASSWD: /usr/local/bin/slxlog EOF chmod 0440 "${TM_SUDO_CONF}" || perror "# Could not set perms of '${TM_SUDO_CONF}' to 0440!" } diff --git a/satellit_installer/includes/50-copyscripts.inc b/satellit_installer/includes/50-copyscripts.inc index b964e02..2ac11a3 100644 --- a/satellit_installer/includes/50-copyscripts.inc +++ b/satellit_installer/includes/50-copyscripts.inc @@ -19,5 +19,12 @@ install_javadaemon() { install_pidtree() { mkdir -p "/usr/local/bin" cp -a "$BASEDIR/static_files/pidtree" "/usr/local/bin/" || perror "Could not install pidtree" + chown root:root "/usr/local/bin/pidtree" +} + +install_slxlog() { + mkdir -p "/usr/local/bin" + cp -a "$BASEDIR/static_files/slxlog" "/usr/local/bin/" || perror "Could not install slxlog" + chown root:root "/usr/local/bin/slxlog" } diff --git a/satellit_installer/satellit_installer b/satellit_installer/satellit_installer index f135985..0d52f6b 100755 --- a/satellit_installer/satellit_installer +++ b/satellit_installer/satellit_installer @@ -148,6 +148,7 @@ drop_firstrun_script install_javadaemon install_pidtree +install_slxlog set_directory_permissions diff --git a/satellit_installer/static_files/slxlog b/satellit_installer/static_files/slxlog new file mode 100755 index 0000000..55110ae --- /dev/null +++ b/satellit_installer/static_files/slxlog @@ -0,0 +1,6 @@ +#!/bin/sh + +[ "x$(whoami)" != "xwww-data" ] && exec sudo -n -u www-data "$0" "$@" + +php /srv/openslx/www/slx-admin/api.php "$@" + |