new install-etc target
authordpavlin <dpavlin@8392b6e1-25fa-0310-8288-cc32f8e212ea>
Sun, 31 Jul 2005 18:58:26 +0000 (18:58 +0000)
committerdpavlin <dpavlin@8392b6e1-25fa-0310-8288-cc32f8e212ea>
Sun, 31 Jul 2005 18:58:26 +0000 (18:58 +0000)
git-svn-id: svn+ssh://llin/home/dpavlin/private/svn/BackupPC/trunk@33 8392b6e1-25fa-0310-8288-cc32f8e212ea

Makefile

index 28ec651..6071a9d 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,5 @@
 tmp=/tmp/backuppc-svn/
+target=/data/backuppc/
 
 all:
        @echo "make install to install BackupPC using sudo"
@@ -6,18 +7,21 @@ all:
 test: stop reinstall start
 
 reinstall:
-       sudo perl ./configure.pl --batch --config-path=/data/backuppc/data/conf/config.pl
+       sudo perl ./configure.pl --batch --config-path=$(target)/data/conf/config.pl
 
 install:
        sudo perl ./configure.pl
 
 start:
        #sudo -u backuppc /data/backuppc/bin/BackupPC -d
-       sudo /data/backuppc/etc/backuppc start
+       sudo $(target)/etc/backuppc start
 
 stop:
        #sudo -u backuppc killall BackupPC && sleep 1 || true
-       sudo /data/backuppc/etc/backuppc stop
+       sudo $(target)/etc/backuppc stop
+
+install-etc:
+       test -d $(target)/etc || cp -r etc $(target) && chmod 755 $(target)/etc/backuppc
 
 asa:
        rm -Rf $(tmp)