diff options
author | Markus Heiser <markus.heiser@darmarit.de> | 2020-02-23 12:10:45 +0100 |
---|---|---|
committer | Markus Heiser <markus.heiser@darmarit.de> | 2020-02-23 12:10:45 +0100 |
commit | 5fb6d4f508d9744a8d82160ca184729514bc18c8 (patch) | |
tree | 8b96368ef9b097bfe2b908dd2b56026f1b637c25 /utils/lxc.sh | |
parent | e36e0f80aeec5d513b0bf8d4e4dc94c9fa4d98b4 (diff) | |
download | searxng-5fb6d4f508d9744a8d82160ca184729514bc18c8.tar.gz searxng-5fb6d4f508d9744a8d82160ca184729514bc18c8.zip |
LXC: normalize package installation & user creation.
utils/lib.sh:
- get DIST_ID & DIST_VERSION from /etc/os-release
- pkg_[install|remove|...] supports ubuntu, debian, archlinux & fedora
utils/lxc.sh
- Workaround for the "setrlimit(RLIMIT_CORE): Operation not permitted" error::
'Set disable_coredump false' >> /etc/sudo.conf
utils/[searx.sh|filtron.sh|morty.sh]
- switched user creation from 'adduser' perl script to 'useradd' built-in
command
utils/searx.sh
- install packages for ubuntu, debian, archlinux & fedora
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
Diffstat (limited to 'utils/lxc.sh')
-rwxr-xr-x | utils/lxc.sh | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/utils/lxc.sh b/utils/lxc.sh index 08205d374..8020b1346 100755 --- a/utils/lxc.sh +++ b/utils/lxc.sh @@ -39,12 +39,15 @@ ubu1904_boilerplate="$ubu1804_boilerplate" # shellcheck disable=SC2034 archlinux_boilerplate=" pacman -Syu --noconfirm -pacman -S --noconfirm git curl wget +pacman -S --noconfirm git curl wget sudo +echo 'Set disable_coredump false' >> /etc/sudo.conf " +# shellcheck disable=SC2034 fedora31_boilerplate=" dnf update -y -dnf install -y git curl wget +dnf install -y git curl wget hostname +echo 'Set disable_coredump false' >> /etc/sudo.conf " REMOTE_IMAGES=() @@ -162,7 +165,9 @@ main() { lxc exec "${i}" -- "$@" exit_val=$? if [[ $exit_val -ne 0 ]]; then - err_msg "[${_BBlue}${i}${_creset}] exit code (${_BRed}${exit_val}${_creset}) from ${_BGreen}${*}${_creset}" + warn_msg "[${_BBlue}${i}${_creset}] exit code (${_BRed}${exit_val}${_creset}) from ${_BGreen}${*}${_creset}" + else + info_msg "[${_BBlue}${i}${_creset}] exit code (${_BRed}${exit_val}${_creset}) from ${_BGreen}${*}${_creset}" fi done ;; |