From 3253c180fcc17b3aa3bd0dcbff868765b18c723e Mon Sep 17 00:00:00 2001 From: DarkFeather Date: Sat, 30 Mar 2024 14:32:43 -0500 Subject: [PATCH] Removing tmux.service -- accounted for in EtcFiles/profile.d/shadowarch-session.sh Adding session dependence to Ansible Ensuring EtcFiles/profile.d/shadowarch-ssh.sh starts ssh-agent user service --- EtcFiles/Makefile | 2 +- EtcFiles/profile.d/shadowarch-aliases.sh | 2 +- EtcFiles/profile.d/shadowarch-ansible.sh | 1 + EtcFiles/profile.d/shadowarch-session.sh | 2 +- EtcFiles/profile.d/shadowarch-ssh.sh | 4 ++++ PKGBUILD | 2 +- 6 files changed, 9 insertions(+), 4 deletions(-) diff --git a/EtcFiles/Makefile b/EtcFiles/Makefile index 9f92f10..6091c24 100644 --- a/EtcFiles/Makefile +++ b/EtcFiles/Makefile @@ -1,5 +1,5 @@ syncList = profile.d tmux.conf -userServiceList = tmux.service +userServiceList = compile: ./shadowarch ${syncList} ${userServiceList} ./shadowarch.vim ./skel @echo Nothing to compile diff --git a/EtcFiles/profile.d/shadowarch-aliases.sh b/EtcFiles/profile.d/shadowarch-aliases.sh index 3ac035f..71e5dbf 100644 --- a/EtcFiles/profile.d/shadowarch-aliases.sh +++ b/EtcFiles/profile.d/shadowarch-aliases.sh @@ -17,7 +17,7 @@ function vncdesktop() { alias vi=vim alias view="vim -R" alias top="top -o %CPU" -alias make-entrypoints="egrep '^[a-zA-Z0-9\-]*:' Makefile" +alias make-entrypoints="grep -E '^[a-zA-Z0-9\-]*:' Makefile" alias rdns="dig +short -x " alias dns="dig +short " export WEECHAT_HOME=$HOME/.weechat diff --git a/EtcFiles/profile.d/shadowarch-ansible.sh b/EtcFiles/profile.d/shadowarch-ansible.sh index f5e7582..6e3d02a 100644 --- a/EtcFiles/profile.d/shadowarch-ansible.sh +++ b/EtcFiles/profile.d/shadowarch-ansible.sh @@ -1,4 +1,5 @@ ### Ansible ### +source /etc/profile.d/shadowarch-shell-environment.sh export ANSIBLE_VAULT_PASSWORD_FILE=$HOME/password-store/${organization}.vault.password export ANSIBLE_VAULT_FILE=$HOME/password-store/${organization}.vault alias ansible="/usr/bin/ansible -e @${ANSIBLE_VAULT_FILE}" diff --git a/EtcFiles/profile.d/shadowarch-session.sh b/EtcFiles/profile.d/shadowarch-session.sh index 40972a5..1939e02 100644 --- a/EtcFiles/profile.d/shadowarch-session.sh +++ b/EtcFiles/profile.d/shadowarch-session.sh @@ -13,6 +13,6 @@ if [ -n "$SSH_CLIENT" ]; then fi; ### XFCE4 ### -elif [ `who -m | egrep "^$(whoami)" | awk '{ print $2; }' | egrep -c "^tty"` -eq 1 ] && [ -x /usr/sbin/startxfce4 ] && [ `pgrep -ac xinit` -eq 0 ] && [ `whoami` != 'root' ]; then +elif [ `who -m | grep -E "^$(whoami)" | awk '{ print $2; }' | grep -E -c "^tty"` -eq 1 ] && [ -x /usr/sbin/startxfce4 ] && [ `pgrep -ac xinit` -eq 0 ] && [ `whoami` != 'root' ]; then exec startxfce4 fi diff --git a/EtcFiles/profile.d/shadowarch-ssh.sh b/EtcFiles/profile.d/shadowarch-ssh.sh index 0f61de5..8d69b51 100644 --- a/EtcFiles/profile.d/shadowarch-ssh.sh +++ b/EtcFiles/profile.d/shadowarch-ssh.sh @@ -1,5 +1,9 @@ ### SSH ### # Tell shell about ssh-agent -- enable with 'systemctl --user enable --now ssh-agent.service' +if [ `ps -u "$USER" | grep -c ssh-agent` -eq 0 ]; then + systemctl --user start ssh-agent.service + sleep 1 +fi export SSH_AGENT_PID="$(pgrep -fu "$USER" ssh-agent)" if [ -n "$SSH_AGENT_PID" ]; then export SSH_AUTH_SOCK="/run/user/$EUID/ssh-agent.socket" diff --git a/PKGBUILD b/PKGBUILD index 680978d..32a1ff2 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -11,7 +11,7 @@ pkgrel() { epoch="$(git log | grep -c commit)" pkgdesc="$(head -n 1 README.md)" arch=("x86_64") -url="https://aninix.net/foundation/${pkgname}" +url="$(git config remote.origin.url | sed 's/.git$//')" license=('custom') groups=() provides=("${pkgname}")