|
@@ -1,7 +1,25 @@
|
|
|
-# If you want to restart even on crash, uncomment while and done lines.
|
|
|
+#!/bin/bash
|
|
|
+
|
|
|
+function wekan_repo_check(){
|
|
|
+ git_remotes="$(git remote show 2>/dev/null)"
|
|
|
+ res=""
|
|
|
+ for i in $git_remotes; do
|
|
|
+ res="$(git remote get-url $i | sed 's/.*wekan\/wekan.*/wekan\/wekan/')"
|
|
|
+ if [[ "$res" == "wekan/wekan" ]]; then
|
|
|
+ break
|
|
|
+ fi
|
|
|
+ done
|
|
|
|
|
|
+ if [[ "$res" != "wekan/wekan" ]]; then
|
|
|
+ echo "$PWD is not a wekan repository"
|
|
|
+ exit;
|
|
|
+ fi
|
|
|
+}
|
|
|
+
|
|
|
+# If you want to restart even on crash, uncomment while and done lines.
|
|
|
#while true; do
|
|
|
- cd ~/repos/wekan/.build/bundle
|
|
|
+ wekan_repo_check
|
|
|
+ cd .build/bundle
|
|
|
#export MONGO_URL='mongodb://127.0.0.1:27019/wekantest'
|
|
|
#export MONGO_URL='mongodb://127.0.0.1:27019/wekan'
|
|
|
export MONGO_URL='mongodb://127.0.0.1:27019/wekantest'
|
|
@@ -18,6 +36,6 @@
|
|
|
export PORT=2000
|
|
|
#export LDAP_ENABLE=true
|
|
|
node main.js
|
|
|
- # & >> ~/repos/wekan.log
|
|
|
- cd ~/repos
|
|
|
+ # & >> ../../wekan.log
|
|
|
+ cd ../..
|
|
|
#done
|