diff options
Diffstat (limited to 'satellit_installer/static_files/system-updates/usr/local')
-rwxr-xr-x | satellit_installer/static_files/system-updates/usr/local/bin/slxlog | 6 | ||||
-rwxr-xr-x | satellit_installer/static_files/system-updates/usr/local/sbin/slx-wait-online | 15 |
2 files changed, 21 insertions, 0 deletions
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 + |