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/filtron.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/filtron.sh')
-rwxr-xr-x | utils/filtron.sh | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/utils/filtron.sh b/utils/filtron.sh index 2d2270812..ba284787e 100755 --- a/utils/filtron.sh +++ b/utils/filtron.sh @@ -106,7 +106,7 @@ main() { rst_title "$SERVICE_NAME" part required_commands \ - dpkg apt-get install git wget curl \ + sudo install git wget curl \ || exit local _usage="unknown or missing $1 command $2" @@ -231,9 +231,11 @@ assert_user() { rst_title "user $SERVICE_USER" section echo tee_stderr 1 <<EOF | bash | prefix_stdout -sudo -H adduser --shell /bin/bash --system --home $SERVICE_HOME \ - --disabled-password --group --gecos 'Filtron' $SERVICE_USER -sudo -H usermod -a -G shadow $SERVICE_USER +useradd --shell /bin/bash --system \ + --home-dir "$SERVICE_HOME" \ + --comment 'Reverse HTTP proxy to filter requests' $SERVICE_USER +mkdir "$SERVICE_HOME" +chown -R "$SERVICE_GROUP:$SERVICE_GROUP" "$SERVICE_HOME" groups $SERVICE_USER EOF SERVICE_HOME="$(sudo -i -u "$SERVICE_USER" echo \$HOME)" |