ukdtom / ClaimIt

ClaimIt 4 Plex Media Server
Mozilla Public License 2.0
74 stars 19 forks source link

Linux (ubuntu) and sh #23

Closed insanepoet closed 4 years ago

insanepoet commented 4 years ago

As a heads up by using #!/bin/sh you will have an error thrown on Ubuntu as it tries to execute the script with dash instead of bash. There shouldn't be any issue with specifying #!/bin/bash with other distros but i didn't catch it on my read-through before running and had a headscratcher for a second.

Not going to do a pr for two letters, but anyone that is trying to use this wonderful script to solve a botched server claim on a buntu machine can easily fix it on their system by modifying line one and adding them so i figured id drop an issue as a heads up.

TLDR: Change line 1 of the .sh to read #!/bin/bash so you don't rely on the symbolic link for shell selection.

ziggimon commented 4 years ago

Did you run it as the wiki/readme says?

Note: If running Ubuntu or Debian, type bash claimpms.sh instead of ./claimpms.sh, since these two distro's have bash as their default shell.

https://github.com/ukdtom/ClaimIt/wiki/How-To-Linux,-Mac

Dash has a tendency to break a lot of shell script stuff. And Ubuntu seems to be the only distro set on using it. All other distros and NAS’s have /bin/sh not all have bash, thus the reason its not using bash.

ziggimon commented 4 years ago

Closing due to lack of response.