summaryrefslogtreecommitdiff
path: root/system/anything-sync-daemon/rc.asd
blob: ababa0a00dabf6c2dd303f4283eb220aeb67aa35 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/bin/sh
# Adaptation of Marcel Saegebarth's rc.psd script for slackbuilds.org.

description="Directories syncing"
extra_commands="resync"
description_resync="Manually sync the directories with running tmpfs image"

start() {
  echo "Starting Anything-Sync-Daemon"
  /usr/bin/anything-sync-daemon sync
}

stop() {
  echo "Stopping Anything-Sync-Daemon"
  /usr/bin/anything-sync-daemon unsync
}

status() {
  /usr/bin/anything-sync-daemon debug
}

resync() {
  echo "Syncing directories in tmpfs to physical disc"
  /usr/bin/anything-sync-daemon resync
}

case "$1" in
  start)
    start ;;
  stop)
    stop ;;
  resync)
    resync ;;
  status)
    status ;;
  *)
    echo $"Usage: $0 {start|stop|resync|status}"
    exit 1
esac