From 7953be01ad3617a9551a12b311d145aba294eacb Mon Sep 17 00:00:00 2001 From: zeus Date: Thu, 25 Mar 2021 22:56:03 +0200 Subject: [PATCH] check sudo --- install.sh | 13 +++++++++++++ restart | 1 + start | 1 + stop | 1 + 4 files changed, 16 insertions(+) create mode 120000 restart create mode 120000 start create mode 120000 stop diff --git a/install.sh b/install.sh index 6d2eab3..3b07190 100755 --- a/install.sh +++ b/install.sh @@ -1,5 +1,8 @@ #!/bin/bash + +if [[ $EUID -ne 0 ]]; then + wdir=$PWD wdir_connect="$wdir/src-local/hybrid/connect" @@ -263,3 +266,13 @@ echo " Start Server: ./start.sh " echo "" echo " Stop Server: ./stop.sh " echo "" + +else + + echo "" + echo "-------------------------" + echo "Run ./install.sh as Non-Root User" + echo "-------------------------" + echo "" +fi + diff --git a/restart b/restart new file mode 120000 index 0000000..160502d --- /dev/null +++ b/restart @@ -0,0 +1 @@ +restart.sh \ No newline at end of file diff --git a/start b/start new file mode 120000 index 0000000..ebcc7e6 --- /dev/null +++ b/start @@ -0,0 +1 @@ +start.sh \ No newline at end of file diff --git a/stop b/stop new file mode 120000 index 0000000..6bb3ec6 --- /dev/null +++ b/stop @@ -0,0 +1 @@ +stop.sh \ No newline at end of file