Skip to content

Commit

Permalink
ops: Fix start script errors
Browse files Browse the repository at this point in the history
  • Loading branch information
wiz committed Dec 13, 2024
1 parent bc5e3aa commit a27b0c2
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions start
Original file line number Diff line number Diff line change
Expand Up @@ -114,9 +114,7 @@ generate_popular_scripts() {

# This function is for inserting the cronjob for generating the popular scripts
CRONJOB_CMD="\"${HOME}/electrs/start\" \"${NETWORK}\" popular-scripts"
insert_cronjob() {
(crontab -l 2>/dev/null; echo "${CRONJOB_TIMING} ${CRONJOB_CMD}") | crontab -
}
echo "${CRONJOB_TIMING} ${CRONJOB_CMD}"

case "${2}" in
popular-scripts)
Expand Down Expand Up @@ -178,12 +176,8 @@ do
ELECTRUM_TXS_LIMIT=9000
fi

# if [ ! -e "${POPULAR_SCRIPTS_FILE}" ];then
# generate_popular_scripts
# fi

if [ ! (crontab -l | grep "${CRONJOB_CMD}") ];then
insert_cronjob
if [ ! -e "${POPULAR_SCRIPTS_FILE}" ];then
generate_popular_scripts
fi

# Run the electrs process (Note: db-dir is used in both commands)
Expand Down

0 comments on commit a27b0c2

Please sign in to comment.