aboutsummaryrefslogtreecommitdiff
path: root/system/anything-sync-daemon/rc.asd
diff options
context:
space:
mode:
authorWinkel Manah <winkel.manah@outlook.com>2015-07-22 10:42:13 +0700
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2015-07-22 10:42:13 +0700
commit945b6bba3a82dfe7cbd4a8d0180ca34d7071b47e (patch)
treeb83fef1a4038b5ebb33d653a76b68ff1df635ae7 /system/anything-sync-daemon/rc.asd
parent1facdd736c831889c0043433474b37c5b93a43d2 (diff)
system/anything-sync-daemon: Added (pseudo-daemon).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'system/anything-sync-daemon/rc.asd')
-rw-r--r--system/anything-sync-daemon/rc.asd39
1 files changed, 39 insertions, 0 deletions
diff --git a/system/anything-sync-daemon/rc.asd b/system/anything-sync-daemon/rc.asd
new file mode 100644
index 0000000000000..ababa0a00dabf
--- /dev/null
+++ b/system/anything-sync-daemon/rc.asd
@@ -0,0 +1,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