v1.5.0
[BackupPC.git] / init.d / src / solaris-backuppc
diff --git a/init.d/src/solaris-backuppc b/init.d/src/solaris-backuppc
new file mode 100755 (executable)
index 0000000..e374f86
--- /dev/null
@@ -0,0 +1,56 @@
+#!/bin/sh
+#
+# DESCRIPTION
+#
+#   Startup init script for BackupPC for solaris.
+#
+# Distributed with BackupPC version 1.5.0, released 2 Aug 2002.
+#
+# Not tested...
+# 
+
+start() {
+    #
+    # You can set the SMB share password here is you wish.  Otherwise
+    # you should put it in the config.pl script.
+    # If you put it here make sure this file has no read permissions
+    # for normal users!  See the documentation for more information.
+    #
+    #PASSWD=
+    #export PASSWD
+    #
+    su __BACKUPPCUSER__ -c "__INSTALLDIR__/bin/BackupPC -d"
+}
+
+stop() {
+    /usr/bin/pkill -f "__INSTALLDIR__/bin/BackupPC -d"
+}
+
+restart() {
+    stop
+    start
+}      
+
+reload() {
+    /usr/bin/pkill -1 -f "__INSTALLDIR__/bin/BackupPC -d"
+}
+
+case "$1" in
+  start)
+       start
+       ;;
+  stop)
+       stop
+       ;;
+  restart)
+       restart
+       ;;
+  reload)
+       reload
+       ;;
+  *)
+       echo "Usage: $0 {start|stop|restart|reload}"
+       exit 1
+esac
+
+exit $?