Summary Files Commits Branches @commit @diff @stats
path: root / tools / move-to-www.sh
diff options
context:
space:
mode:
1 files changed, 16 insertions, 0 deletions
-rwxr-xr-xtools/move-to-www.sh16
diff --git a/tools/move-to-www.sh b/tools/move-to-www.sh
new file mode 100755
index 0000000..ee13725
--- /dev/null
+++ b/tools/move-to-www.sh
@@ -0,0 +1,16 @@
+#!/bin/bash
+
+if [ "$EUID" -ne 0 ]; then
+ echo "Please run as root"
+ exit
+fi
+
+DEFAULT_DIR="/var/www/devrix-job-board/"
+
+if [ ! -d "$DEFAULT_DIR" ]; then
+ mkdir $DEFAULT_DIR
+ chown www-data:www-data $DEFAULT_DIR
+fi
+
+cp -R ../src/. $DEFAULT_DIR
+chown -R www-data:www-data $DEFAULT_DIR*