-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
incorrect syntax if-condition S99pollDHCP.sh, line 42 #19
Comments
Hi - it looks like the first error you reported (line 42) happened for you because you ran "S99pollDHCP.sh stop" when poll-dhcp-changes was not running. The script should probably be fixed to deal with this situation better. You are correct about the permissions issue. These scripts assume everything is run as root. This is because the script needs to modify DNS files that the DNS service also reads and writes to, and it runs as root. It might be possible to modify how these services work, but it would probably involve changing how DNS and DHCP services work in synology? If this is something you'd like to do, I'll take a look at a pull request |
…ously running added status command to check current status of poll-dhcp-changes #19
Actually I looked into this a little more it might have been due to multiple poll-dhcp-changes.sh processes running. I fixed the script to deal with this better. This is what I get for output when I run this manually:
|
…ously running added status command to check current status of poll-dhcp-changes #19
When I tried to execute the S99pollDHCP.sh script to stop it from the commandline I got back:
Looking at that line it seems the text quotation marks are improperly placed. (But I'm a noob at linux scripting) Correcting the conditional statement as follows made it work:
if [ "$MYPID -gt 1" ]; then
I tried also as followed (akin to line 29)
if [ $MYPID -gt "1" ]; then
but this results in error:
Oddly enough this line 29 executes normally when starting the script with:
I'm still a noob when it comes to github and linux scripting so I didn't want to try and make a fork or whatever is needed to make a change in the code. Please verify if this is correct, and not break some other consideration.
Also, I noticed this script only works for the default case of a administrative user "admin". For security reasons I disabled that user and made a custom administrator user. Can these scripts be made more flexible in this regard? Or was there some reason to not deviate from default?
The text was updated successfully, but these errors were encountered: