slackbuilds

My Slackbuilds
git clone git://git.server.ky/slackcoder/slackbuilds
Log | Files | Refs | README

doinst.sh (877B)


      1 config() {
      2   NEW="$1"
      3   OLD="$(dirname $NEW)/$(basename $NEW .new)"
      4   # If there's no config file by that name, mv it over:
      5   if [ ! -r $OLD ]; then
      6     mv $NEW $OLD
      7   elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then
      8     # toss the redundant copy
      9     rm $NEW
     10   fi
     11   # Otherwise, we leave the .new copy for the admin to consider...
     12 }
     13 
     14 # Group for all taler exchange users.
     15 if ! getent group libeufin-bank >/dev/null; then
     16   groupadd libeufin-bank \
     17     --system \
     18     || true
     19 fi
     20 
     21 if ! getent passwd libeufin-bank >/dev/null; then
     22   useradd libeufin-bank \
     23     --comment 'Talers pseudo bank' \
     24     --gid libeufin-bank \
     25     --system \
     26     --home-dir /var/lib/libeufin-bank \
     27     || true
     28 fi
     29 
     30 config etc/httpd/sites-available/libeufin-bank.conf.new
     31 config etc/libeufin/libeufin-bank.conf.new
     32 config etc/libeufin/settings.json.new
     33 config etc/rc.d/rc.libeufin-bank.new