Skip to content
This repository has been archived by the owner on Jul 26, 2022. It is now read-only.

Commit

Permalink
remove circular reference
Browse files Browse the repository at this point in the history
  • Loading branch information
vwiencek committed Sep 2, 2014
1 parent e6cc901 commit 36cdd81
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 10 deletions.
14 changes: 8 additions & 6 deletions gradle/daemon/syncanyd
Expand Up @@ -42,13 +42,13 @@ mkdir -p $LOGDIR
start() {
RUNNING=$(process_running)

echo "Starting daemon: "
echo -n "Starting daemon: "

if [ $RUNNING -eq 1 ]; then
echo "$NAME already running (pid $PID)"
else
nohup $DAEMON $DAEMON_OPTS > /dev/null 2>&1 &
nohup "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.syncany.Syncany $DAEMON_OPTS > /dev/null 2>&1 &

PID=-1
TRIES=10

Expand All @@ -74,7 +74,7 @@ start() {
stop() {
RUNNING=$(process_running)

echo "Stopping daemon: "
echo -n "Stopping daemon: "

if [ $RUNNING -eq 0 ]; then
echo "$NAME not running"
Expand Down Expand Up @@ -127,19 +127,21 @@ force_stop() {


status() {
RUNNING=$(process_running)
echo -n "Checking daemon: "$NAME

if [ ! -e /proc/$PID ]; then
if [ $RUNNING -eq 0 ]; then
echo " not running"
else
echo " running (pid $PID)."
fi
}

reload() {
RUNNING=$(process_running)
echo -n "Reloading daemon: "$NAME

if [ ! -e /proc/$PID ]; then
if [ $RUNNING -eq 0 ]; then
echo " not running"
else
echo "reload" >> $CONTROLFILE
Expand Down
10 changes: 8 additions & 2 deletions gradle/gradle/application.distribution.gradle
Expand Up @@ -47,6 +47,7 @@ startScripts {

// Update unix text
def unixText = unixFile.text
def usage = "Usage: sy daemon (start|stop|reload|restart|status|force-stop)"
textTmp = ""
def daemonScript = new File('gradle/daemon/syncanyd').text

Expand All @@ -63,11 +64,16 @@ startScripts {
textTmp += ' stop ;; \n'
textTmp += ' status) \n'
textTmp += ' status ;; \n'
textTmp += ' reload) \n'
textTmp += ' reload ;; \n'
textTmp += ' force-stop) \n'
textTmp += ' force_stop ;; \n'

textTmp += ' *) \n'
textTmp += ' echo "Usage: sy daemon (start|stop|reload|restart|status|force-stop)"\n'
textTmp += ' echo "' + usage + '"\n'
textTmp += ' esac ;; \n'
textTmp += ' *) \n'
textTmp += line + ' ;; \n'
textTmp += ' ' + line + ' ;; \n'
textTmp += 'esac \n'
}
else {
Expand Down
2 changes: 0 additions & 2 deletions syncany-lib/.gitignore

This file was deleted.

0 comments on commit 36cdd81

Please sign in to comment.