Skip to content

Commit

Permalink
safeguards in install scripts to prevent running as root
Browse files Browse the repository at this point in the history
  • Loading branch information
snopf committed Feb 6, 2020
1 parent d83416a commit 51defaf
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/host/install.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
#!/bin/bash

if (( $EUID == 0 )); then
echo "Do not run this as root"
exit
fi

echo "Removing unnecessary data from binary folders.."
./clean_up_pyinstaller.sh

Expand Down
5 changes: 5 additions & 0 deletions src/host/install_native_app.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
#!/bin/bash

if (( $EUID == 0 )); then
echo "Do not run this as root"
exit
fi

echo "Creating directory ~/.snopf/snopf_browser_driver"
mkdir -p ~/.snopf/snopf_browser_driver

Expand Down

0 comments on commit 51defaf

Please sign in to comment.