Skip to content

Commit

Permalink
Merge pull request #77 from christian1980nrw/Fix-https/github.com//is…
Browse files Browse the repository at this point in the history
…sues/17

Update run
  • Loading branch information
christian1980nrw authored Oct 2, 2023
2 parents 67c59d5 + fb1921f commit d4e3392
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions scripts/run
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,13 @@ code='(crontab -l | grep -Fxq "0 * * * * /data/etc/Spotmarket-Switcher/controlle
if [ ! -e "$rc_local_file" ]; then
echo "#!/bin/sh" > "$rc_local_file"
chmod +x "$rc_local_file"
$code
fi

# Check if the code is already in rc.local, if not, add it
if ! grep -qF "$code" "$rc_local_file"; then
echo "$code" >> "$rc_local_file"
$code
fi

# Display a success message in DEBUG mode
Expand Down

0 comments on commit d4e3392

Please sign in to comment.