diff options
author | Christian Rößler | 2016-08-30 18:56:20 +0200 |
---|---|---|
committer | Christian Rößler | 2016-08-30 18:56:20 +0200 |
commit | 6dd5afbecc6ba0596e257775351350be1fb74938 (patch) | |
tree | 5a6157e492a79491ce295e9586707ba8c5ce8771 /satellit_installer/includes | |
parent | [SSPS] config.properties (dmsd): + db.location-table = openslx.location (diff) | |
download | setup-scripts-6dd5afbecc6ba0596e257775351350be1fb74938.tar.gz setup-scripts-6dd5afbecc6ba0596e257775351350be1fb74938.tar.xz setup-scripts-6dd5afbecc6ba0596e257775351350be1fb74938.zip |
[SSPS/SSUS] Writable /var/cache/slx-admin für user www-data and symlink [WARNING: NEEDS TESTING!]
Diffstat (limited to 'satellit_installer/includes')
-rw-r--r-- | satellit_installer/includes/00-dirs.inc | 1 | ||||
-rw-r--r-- | satellit_installer/includes/90-set_directory_permissions.inc | 10 | ||||
-rw-r--r-- | satellit_installer/includes/90-set_links.inc | 13 |
3 files changed, 21 insertions, 3 deletions
diff --git a/satellit_installer/includes/00-dirs.inc b/satellit_installer/includes/00-dirs.inc index 5ed3328..871cd8a 100644 --- a/satellit_installer/includes/00-dirs.inc +++ b/satellit_installer/includes/00-dirs.inc @@ -8,4 +8,5 @@ export LDADPDIR="/opt/ldadp/" export TFTPDIR="/srv/openslx/tftp" export WWWDIR="/srv/openslx/www" export IPXEDIR="$OPENSLXDIR/ipxe" +export SLXADMINCACHE="/var/cache/slx-admin" readonly CONFIGDIR DMSDDIR TASKMANDIR OPENSLXDIR OPENSLXSRVDIR LDADPDIR SYNCDAEMONDIR TFTPDIR WWWDIR diff --git a/satellit_installer/includes/90-set_directory_permissions.inc b/satellit_installer/includes/90-set_directory_permissions.inc index 62c63c3..f40322b 100644 --- a/satellit_installer/includes/90-set_directory_permissions.inc +++ b/satellit_installer/includes/90-set_directory_permissions.inc @@ -48,7 +48,11 @@ set_directory_permissions() { # Make sure we spare the binary chown root:root "$LDADPDIR/ldadp" # ... not the binary. - mkdir -p -m 755 /opt/openslx/proxy 2>/dev/null - chmod 755 /opt/openslx/proxy 2>/dev/null # if already there - chown www-data /opt/openslx/proxy 2>/dev/null + mkdir -p -m 755 "$OPENSLXDIR"/proxy 2>/dev/null + chmod 755 "$OPENSLXDIR"/proxy 2>/dev/null # if already there + chown www-data "$OPENSLXDIR"/proxy 2>/dev/null + + mkdir -p -m 0755 "$SLXADMINCACHE" + chmod 0755 "$SLXADMINCACHE" # if already there + chown -R www-data:www-data "$SLXADMINCACHE" } diff --git a/satellit_installer/includes/90-set_links.inc b/satellit_installer/includes/90-set_links.inc new file mode 100644 index 0000000..fc20ef8 --- /dev/null +++ b/satellit_installer/includes/90-set_links.inc @@ -0,0 +1,13 @@ +set_links() { + +if [ -f "${SLXADMINCACHE}/baseconfig-bwidm_settings.json" ]; then + echo -n "# ${SLXADMINCACHE}/baseconfig-bwidm_settings.json already there." + [ -h "${SLXADMINCACHE}/baseconfig-bwidm_settings.json" ] && \ + echo " ... and is a symbolic link." || \ + echo " ... but is NOT a symbolic link." +else + ln -s "${WWWDIR}/slx-admin/modules-available/baseconfig_bwidm/baseconfig/settings.json" "${SLXADMINCACHE}/baseconfig-bwidm_settings.json" + echo "# ${SLXADMINCACHE}/baseconfig-bwidm_settings.json link set." +fi + +} |