[Modify the use of sudo commands]
This commit is contained in:
parent
0e0be34d44
commit
4db1f9fa22
|
@ -2,6 +2,12 @@
|
||||||
#set -x
|
#set -x
|
||||||
#path=`pwd`
|
#path=`pwd`
|
||||||
insmetaPath="/usr/local/taos/script"
|
insmetaPath="/usr/local/taos/script"
|
||||||
sudo chmod -R 744 ${insmetaPath}
|
|
||||||
|
csudo=""
|
||||||
|
if command -v sudo > /dev/null; then
|
||||||
|
csudo="sudo"
|
||||||
|
fi
|
||||||
|
|
||||||
|
${csudo} chmod -R 744 ${insmetaPath}
|
||||||
cd ${insmetaPath}
|
cd ${insmetaPath}
|
||||||
sudo ./post.sh
|
${csudo} ./post.sh
|
||||||
|
|
Loading…
Reference in New Issue