Skip to content

Commit

Permalink
Merge pull request #28 from Martinski4GitHub/develop
Browse files Browse the repository at this point in the history
Remove bad entries in "services-start" script
  • Loading branch information
jackyaz authored Mar 13, 2024
2 parents 40cc81c + 88cd508 commit 026e847
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/bfd397624cdf4803a465d4ae1530e7fe)](https://www.codacy.com/app/jackyaz/scMerlin?utm_source=github.com&utm_medium=referral&utm_content=jackyaz/scMerlin&utm_campaign=Badge_Grade)
![Shellcheck](https://github.com/jackyaz/scMerlin/actions/workflows/shellcheck.yml/badge.svg)

## v2.4.1
### Updated on 2022-01-05
## v2.4.2
### Updated on 2024-03-12
## About
scMerlin allows you to easily control the most common services/scripts on your router. scMerlin also augments your router's WebUI with a Sitemap and dynamic submenus for the main left menu of Asuswrt-Merlin.

Expand Down
14 changes: 11 additions & 3 deletions scmerlin.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@
### Start of script variables ###
readonly SCRIPT_NAME="scMerlin"
readonly SCRIPT_NAME_LOWER="$(echo "$SCRIPT_NAME" | tr 'A-Z' 'a-z' | sed 's/d//')"
readonly SCM_VERSION="v2.4.1"
readonly SCRIPT_VERSION="v2.4.1"
SCRIPT_BRANCH="master"
readonly SCM_VERSION="v2.4.2"
readonly SCRIPT_VERSION="v2.4.2"
SCRIPT_BRANCH="develop"
SCRIPT_REPO="https://jackyaz.io/$SCRIPT_NAME/$SCRIPT_BRANCH"
readonly SCRIPT_DIR="/jffs/addons/$SCRIPT_NAME_LOWER.d"
readonly SCRIPT_WEBPAGE_DIR="$(readlink /www/user)"
Expand Down Expand Up @@ -514,6 +514,10 @@ Auto_Startup(){
fi
fi
if [ -f /jffs/scripts/services-start ]; then
## Clean up erroneous entries ##
grep -iq '# '"${SCRIPT_NAME}[$]$" /jffs/scripts/services-start && \
sed -i -e '/# '"${SCRIPT_NAME}[$]$"'/d' /jffs/scripts/services-start

STARTUPLINECOUNT=$(grep -i -c '# '"$SCRIPT_NAME$" /jffs/scripts/services-start)
STARTUPLINECOUNTEX=$(grep -i -cx "/jffs/scripts/$SCRIPT_NAME_LOWER startup"' & # '"$SCRIPT_NAME$" /jffs/scripts/services-start)

Expand All @@ -540,6 +544,10 @@ Auto_Startup(){
fi
fi
if [ -f /jffs/scripts/services-start ]; then
## Clean up erroneous entries ##
grep -iq '# '"${SCRIPT_NAME}[$]$" /jffs/scripts/services-start && \
sed -i -e '/# '"${SCRIPT_NAME}[$]$"'/d' /jffs/scripts/services-start

STARTUPLINECOUNT=$(grep -i -c '# '"$SCRIPT_NAME$" /jffs/scripts/services-start)

if [ "$STARTUPLINECOUNT" -gt 0 ]; then
Expand Down

0 comments on commit 026e847

Please sign in to comment.