File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -26,6 +26,11 @@ if [ $# -ne 0 ]; then
2626 AZAAN=$1
2727fi
2828
29+ if [ -z " $XDG_RUNTIME_DIR " ]; then
30+ echo " XDG_RUNTIME_DIR variable not set. Please set the variable and run the setup again."
31+ exit 1
32+ fi
33+
2934if [ ! -f " $CONF_FILE " ]; then
3035 echo " Configuration file $CONF_FILE not found"
3136 exit 1
@@ -46,11 +51,11 @@ for prayer in $PRAYER_TIMES; do
4651 PRAYER_TIME_H=$( echo " $prayer " | cut -f2 -d- | cut -f1 -d:)
4752 PRAYER_TIME_M=$( echo " $prayer " | cut -f2 -d- | cut -f2 -d:)
4853
49- NEW_CRON=" $NEW_CRON \n$PRAYER_TIME_M $PRAYER_TIME_H * * * $CURR_PATH /play-azaan.sh $AZAAN #$PRAYER_NAME "
54+ NEW_CRON=" $NEW_CRON \n$PRAYER_TIME_M $PRAYER_TIME_H * * * export XDG_RUNTIME_DIR= $XDG_RUNTIME_DIR && $CURR_PATH /play-azaan.sh $AZAAN #$PRAYER_NAME "
5055done
5156
52- NEW_CRON=" $NEW_CRON \n0 1 * * * $CURR_PATH /$( basename " $0 " ) $AZAAN "
53- NEW_CRON=" $NEW_CRON \n$CRON_BLOCK "
57+ NEW_CRON=" $NEW_CRON \n0 1 * * * export XDG_RUNTIME_DIR= $XDG_RUNTIME_DIR && $CURR_PATH /$( basename " $0 " ) $AZAAN "
58+ NEW_CRON=" $NEW_CRON \n$CRON_BLOCK \n "
5459
5560# echo -e "$NEW_CRON"
5661
You can’t perform that action at this time.
0 commit comments