diff options
author | grufo | 2021-09-18 02:35:16 +0100 |
---|---|---|
committer | grufo | 2021-09-18 02:35:16 +0100 |
commit | f0b6bc77e78cd1fe09dbda53c1a960727e8a2028 (patch) | |
tree | 28fcfaad62f6b86cfe0b8347f3d46970e9b67fa3 /gnunet.install | |
parent | 8ef58801ee2a6fc4f63eaaaa477000603da22902 (diff) | |
download | aur-f0b6bc77e78cd1fe09dbda53c1a960727e8a2028.tar.gz |
Added `/etc/skel/.config/gnunet.conf`
Diffstat (limited to 'gnunet.install')
-rw-r--r-- | gnunet.install | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/gnunet.install b/gnunet.install new file mode 100644 index 000000000000..7d6a2e3ffabd --- /dev/null +++ b/gnunet.install @@ -0,0 +1,28 @@ +post_install() { + + local _PWD_PAIRS_="$(awk -F ':' '$3>=1000 && $3<2000 {print $1":"$6}' '/etc/passwd')" + local _USER_ + local _CFG_FILE_ + + for _PWD_PAIR_ in ${_PWD_PAIRS_}; do + _USER_="$(echo $_PWD_PAIR_ | cut -d ':' -f 1)" + _CFG_FILE_="$(echo $_PWD_PAIR_ | cut -d ':' -f 2)/.config/gnunet.conf" + test -e "${_CFG_FILE_}" || install -Dm644 -o "${_USER_}" -g \ + "$(id -gn "${_USER_}")" /etc/skel/.config/gnunet.conf \ + "${_CFG_FILE_}" + done + + echo + echo 'Do not forget to add your user to the `gnunet` group, with' + echo + echo ' sudo usermod -aG gnunet YOUR-USERNAME' + echo + echo 'If later you want to remove your user from the group, launch:' + echo + echo ' sudo gpasswd --delete YOUR-USERNAME gnunet' + echo + echo 'For information on how to use GNUnet plaese refer to the GNUnet article in the' + echo 'ArchWiki (https://wiki.archlinux.org/title/GNUnet).' + echo + +} |