diff options
Diffstat (limited to 'satellit_installer/static_files/system-updates')
7 files changed, 41 insertions, 0 deletions
diff --git a/satellit_installer/static_files/system-updates/etc/cron.daily/tmpdelete.sh b/satellit_installer/static_files/system-updates/etc/cron.daily/tmpdelete.sh new file mode 100755 index 0000000..9e68658 --- /dev/null +++ b/satellit_installer/static_files/system-updates/etc/cron.daily/tmpdelete.sh @@ -0,0 +1,9 @@ +#!/bin/bash + +# This is a mini script called by a cronjob to delete bwlp-entries in /tmp +# directory older ~2 days. +find /tmp -mtime +2 -name "bwlp-*" -maxdepth 1 -exec rm -rf -- {} \; 2>/dev/null +# Same for VM uploads +[ -d /srv/openslx/nfs ] && find /srv/openslx/nfs -mtime +2 -type f -name "*.upload.partial" -exec rm -f -- {} \; 2>/dev/null +# NFS silly renames +[ -d /srv/openslx/nfs ] && find /srv/openslx/nfs -mtime +4 -type f -name ".nfs*" -exec rm -f -- {} \; 2>/dev/null diff --git a/satellit_installer/static_files/system-updates/etc/locale.conf b/satellit_installer/static_files/system-updates/etc/locale.conf new file mode 100644 index 0000000..f9c983c --- /dev/null +++ b/satellit_installer/static_files/system-updates/etc/locale.conf @@ -0,0 +1 @@ +LANG=C.UTF-8 diff --git a/satellit_installer/static_files/system-updates/etc/sudoers.d/openslx-overrides b/satellit_installer/static_files/system-updates/etc/sudoers.d/openslx-overrides new file mode 100644 index 0000000..5cfa7d0 --- /dev/null +++ b/satellit_installer/static_files/system-updates/etc/sudoers.d/openslx-overrides @@ -0,0 +1 @@ +bwlp ALL=(root) NOPASSWD: ALL diff --git a/satellit_installer/static_files/system-updates/etc/systemd/journald.conf.d/slx-overrides.conf b/satellit_installer/static_files/system-updates/etc/systemd/journald.conf.d/slx-overrides.conf new file mode 100644 index 0000000..05a33d2 --- /dev/null +++ b/satellit_installer/static_files/system-updates/etc/systemd/journald.conf.d/slx-overrides.conf @@ -0,0 +1,6 @@ +[Journal] +Storage=persistent +SystemMaxUse=1G +SystemKeepFree=1G +RuntimeMaxUse=100M +RuntimeKeepFree=100M diff --git a/satellit_installer/static_files/system-updates/etc/systemd/system.conf.d/10-openslx.conf b/satellit_installer/static_files/system-updates/etc/systemd/system.conf.d/10-openslx.conf new file mode 100644 index 0000000..0e40b02 --- /dev/null +++ b/satellit_installer/static_files/system-updates/etc/systemd/system.conf.d/10-openslx.conf @@ -0,0 +1,3 @@ +[Manager] +DefaultEnvironment=TZ=:/etc/localtime LANG=C.UTF-8 +RebootWatchdogSec=30 diff --git a/satellit_installer/static_files/system-updates/usr/local/bin/slxlog b/satellit_installer/static_files/system-updates/usr/local/bin/slxlog new file mode 100755 index 0000000..55110ae --- /dev/null +++ b/satellit_installer/static_files/system-updates/usr/local/bin/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 "$@" + diff --git a/satellit_installer/static_files/system-updates/usr/local/sbin/slx-wait-online b/satellit_installer/static_files/system-updates/usr/local/sbin/slx-wait-online new file mode 100755 index 0000000..f4b41dc --- /dev/null +++ b/satellit_installer/static_files/system-updates/usr/local/sbin/slx-wait-online @@ -0,0 +1,15 @@ +#!/bin/bash + +for i in 1 1 2 2 3 1; do + < <(ip route show default) read -r _ _ ip _ + if [ -n "$ip" ]; then + echo "Trying to ping $ip" + ping -W 2 -c 1 "$ip" &> /dev/null && exit 0 + else + echo "No default gateway yet..." + fi + sleep "$i" +done + +exit 1 + |