fix: get correct script directory

master
Kebler Network System Administrator 2021-12-30 13:15:01 -08:00
parent 38a7074f10
commit eb32c9ae03
1 changed files with 5 additions and 3 deletions

View File

@ -5,7 +5,9 @@ loginout_install() {
[[ ! $(systemctl list-units | grep lightdm) ]] && echo lightdm not running on this machine, aborting && return
SDIR=$(adirname "$0")
SDIR=$(adirname "${BASH_SOURCE[0]}")
# echo source directory: $SDIR
pushd $SDIR &> /dev/null || exit
[[ ! -d /etc/lightdm/lightdm.conf.d ]] && mkdir -p /etc/lightdm/lightdm.conf.d
@ -35,8 +37,8 @@ function add_user_session {
module_load confirm
module_load helpers
SDIR=$(adirname "$0")
SDIR=$(adirname "${BASH_SOURCE[0]}")
# echo source directory: $SDIR
pushd $SDIR &> /dev/null || exit