Update for profile files

This commit is contained in:
DarkFeather 2024-08-12 17:26:50 -05:00
parent 3253c180fc
commit 1fd8e7dc7a
Signed by: DarkFeather
GPG Key ID: 1CC1E3F4ED06F296
5 changed files with 27 additions and 3 deletions

View File

@ -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""

View File

@ -0,0 +1,2 @@
### MOTD ###
[ -f /etc/bash.motd ] && cat /etc/bash.motd

View File

@ -19,6 +19,3 @@ printf "\e[?2004l"
# systemctl --user # systemctl --user
export XDG_RUNTIME_DIR=/run/user/$UID export XDG_RUNTIME_DIR=/run/user/$UID
### MOTD ###
[ -f /etc/bash.motd ] && cat /etc/bash.motd

View File

@ -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

View File

@ -1,6 +1,7 @@
post_upgrade() { post_upgrade() {
if usr/bin/pacman-key -l >/dev/null 2>&1; then if usr/bin/pacman-key -l >/dev/null 2>&1; then
usr/bin/pacman-key --populate aninix usr/bin/pacman-key --populate aninix
usr/bin/pacman-key --lsign 904DE6275579CB589D85720C1CC1E3F4ED06F296
usr/bin/pacman-key --updatedb usr/bin/pacman-key --updatedb
fi fi
} }