diff --git a/EtcFiles/profile.d/shadowarch-ldap.sh b/EtcFiles/profile.d/shadowarch-ldap.sh new file mode 100644 index 0000000..aa11739 --- /dev/null +++ b/EtcFiles/profile.d/shadowarch-ldap.sh @@ -0,0 +1,16 @@ +#!/bin/bash + +if [ -f "${HOME}/password-store/ldap.password" ]; then + searchopts="-y ${HOME}/password-store/ldap.password" +else + searchopts="-W" +fi + +if [ "$USER" == 'root' ]; then + alias ldapsearch="/usr/bin/ldapsearch -x -b 'dc=aninix,dc=net'" +else + alias ldapsearch="/usr/bin/ldapsearch -H 'ldap://127.0.0.1/' ${searchopts} -D 'uid=$USER,ou=People,dc=aninix,dc=net' -b dc=aninix,dc=net" +fi +alias ldapmodify="/usr/bin/ldapmodify -H 'ldap://127.0.0.1/' ${searchopts} -D "cn=root,dc=aninix,dc=net"" +alias ldappasswd="/usr/bin/ldappasswd -H 'ldap://127.0.0.1/' ${searchopts} -D "cn=root,dc=aninix,dc=net"" +alias ldapadd="/usr/bin/ldapadd -H 'ldap://127.0.0.1/' ${searchopts} -D "cn=root,dc=aninix,dc=net"" diff --git a/EtcFiles/profile.d/shadowarch-motd.sh b/EtcFiles/profile.d/shadowarch-motd.sh new file mode 100644 index 0000000..2abd7d9 --- /dev/null +++ b/EtcFiles/profile.d/shadowarch-motd.sh @@ -0,0 +1,2 @@ +### MOTD ### +[ -f /etc/bash.motd ] && cat /etc/bash.motd diff --git a/EtcFiles/profile.d/shadowarch-shell-environment.sh b/EtcFiles/profile.d/shadowarch-shell-environment.sh index 9d23501..bfe6494 100644 --- a/EtcFiles/profile.d/shadowarch-shell-environment.sh +++ b/EtcFiles/profile.d/shadowarch-shell-environment.sh @@ -19,6 +19,3 @@ printf "\e[?2004l" # systemctl --user export XDG_RUNTIME_DIR=/run/user/$UID - -### MOTD ### -[ -f /etc/bash.motd ] && cat /etc/bash.motd diff --git a/EtcFiles/profile.d/shadowarch-user-weechat.sh b/EtcFiles/profile.d/shadowarch-user-weechat.sh new file mode 100644 index 0000000..a69b584 --- /dev/null +++ b/EtcFiles/profile.d/shadowarch-user-weechat.sh @@ -0,0 +1,8 @@ +# Three start conditions: +# * Interactive shell +# * Weechat is installed +# * User doesn't have a running weechat process +# * User isn't root +if [[ $- == *i* ]] && [ -f `which weechat` ] && [ `ps -u $USER | grep -c weechat` -eq 0 ] && [ $USER != 'root' ]; then + weechat; +fi diff --git a/ShadowArch.install b/ShadowArch.install index 56a7e5f..7d13326 100644 --- a/ShadowArch.install +++ b/ShadowArch.install @@ -1,6 +1,7 @@ post_upgrade() { if usr/bin/pacman-key -l >/dev/null 2>&1; then usr/bin/pacman-key --populate aninix + usr/bin/pacman-key --lsign 904DE6275579CB589D85720C1CC1E3F4ED06F296 usr/bin/pacman-key --updatedb fi }