Dash needs to be at first or last place in the regex else it does not work correctly
This commit is contained in:
parent
1a27e2dfb3
commit
0688bdf7e8
|
@ -143,7 +143,7 @@ if [[ "$skipsetup" == "n" ]] || [[ "$skipsetup" == "N" ]]; then
|
||||||
### ask user for the name and path of each instance they wish to update ###
|
### ask user for the name and path of each instance they wish to update ###
|
||||||
for ((i=1; i<=$PTinstances; i++)); do
|
for ((i=1; i<=$PTinstances; i++)); do
|
||||||
read -p "What is the PM2 App name/ id or pid for instance $i? " name[$i]
|
read -p "What is the PM2 App name/ id or pid for instance $i? " name[$i]
|
||||||
chars="a-zA-Z0-9_-\/"
|
chars="a-zA-Z0-9_\/-"
|
||||||
re="\/[$chars]+"
|
re="\/[$chars]+"
|
||||||
execpath=$(pm2 info "${name[$i]}" | grep 'exec cwd');
|
execpath=$(pm2 info "${name[$i]}" | grep 'exec cwd');
|
||||||
if [[ $execpath =~ $re ]];
|
if [[ $execpath =~ $re ]];
|
||||||
|
|
Loading…
Reference in New Issue