wok-next diff backuppc/receipt @ rev 21449

updated slock (1.1 -> 1.4)
author Hans-G?nter Theisgen
date Thu May 07 07:51:56 2020 +0100 (2020-05-07)
parents 00611afb6342
children
line diff
     1.1 --- a/backuppc/receipt	Fri May 12 11:26:54 2017 +0200
     1.2 +++ b/backuppc/receipt	Thu May 07 07:51:56 2020 +0100
     1.3 @@ -20,39 +20,43 @@
     1.4  bzip2 openssh perl-libwww-perl"
     1.5  BUILD_DEPENDS="par2 perl"
     1.6  
     1.7 -# Rules to configure and make the package.
     1.8 -compile_rules()
     1.9 -{
    1.10 -	mkdir -p $DESTDIR/etc/apache/conf.d
    1.11 +compile_rules() {
    1.12 +	mkdir -p $install/etc/apache/conf.d
    1.13  	grep -q share/BackupPC/doc configure.pl ||
    1.14  	sed -i -e 's|/doc|/share/BackupPC/doc|' \
    1.15  		-e 's|bin doc|bin share/BackupPC/doc|' \
    1.16  		configure.pl
    1.17 -	perl configure.pl --batch --dest-dir=$DESTDIR --install-dir=/usr \
    1.18 -		--data-dir=/var/lib/BackupPC --config-dir=/etc/BackupPC \
    1.19 -		--log-dir=/var/log/BackupPC --backuppc-user=www \
    1.20 -		--hostname=localhost --html-dir=/usr/share/BackupPC/www \
    1.21 +
    1.22 +	perl configure.pl \
    1.23 +		--batch \
    1.24 +		--dest-dir=$install \
    1.25 +		--install-dir=/usr \
    1.26 +		--data-dir=/var/lib/BackupPC \
    1.27 +		--config-dir=/etc/BackupPC \
    1.28 +		--log-dir=/var/log/BackupPC \
    1.29 +		--backuppc-user=www \
    1.30 +		--hostname=localhost \
    1.31 +		--html-dir=/usr/share/BackupPC/www \
    1.32  		--html-dir-url=/BackupPC/img \
    1.33 -		--cgi-dir=/usr/share/BackupPC/cgi &&
    1.34 -	cp httpd/BackupPC.conf $DESTDIR/etc/apache/conf.d
    1.35 +		--cgi-dir=/usr/share/BackupPC/cgi \
    1.36 +		&&
    1.37 +	cp httpd/BackupPC.conf $install/etc/apache/conf.d
    1.38  }
    1.39  
    1.40 -# Rules to gen a SliTaz package suitable for Tazpkg.
    1.41 -genpkg_rules()
    1.42 -{
    1.43 +genpkg_rules() {
    1.44  	cp -a $install/* $fs
    1.45  	cp -a $stuff/* $fs
    1.46 -	sed -i -e "s/''http/'http/;s/min''/min'/" \
    1.47 -	       -e 's/-E -N -d/-E -d/' \
    1.48 -	       -e "s/^\\\$Conf{CgiAdminUsers}.*/\$Conf{CgiAdminUsers} = 'root';/" \
    1.49 -	       -e 's|sshPath -q -x|sshPath -o UserKnownHostsFile=/etc/BackupPC/.ssh/known_hosts -i /etc/BackupPC/.ssh/id_rsa -q -x|' \
    1.50 -		$fs/etc/BackupPC/config.pl
    1.51 +	sed \
    1.52 +		-e "s/''http/'http/;s/min''/min'/" \
    1.53 +		-e 's/-E -N -d/-E -d/' \
    1.54 +		-e "s/^\\\$Conf{CgiAdminUsers}.*/\$Conf{CgiAdminUsers} = 'root';/" \
    1.55 +		-e 's|sshPath -q -x|sshPath -o UserKnownHostsFile=/etc/BackupPC/.ssh/known_hosts -i /etc/BackupPC/.ssh/id_rsa -q -x|' \
    1.56 +		-i $fs/etc/BackupPC/config.pl
    1.57  	chown www.www $fs/etc/BackupPC/config.pl
    1.58  	chmod 755 $fs/etc $fs/var $fs/var/*
    1.59  }
    1.60  
    1.61 -post_install()
    1.62 -{
    1.63 +post_install() {
    1.64  	grep -qs backuppc "$1/etc/rcS.conf" ||
    1.65  	sed -i 's/^RUN_DAEMONS="/RUN_DAEMONS="backuppc /' "$1/etc/rcS.conf"
    1.66  	loc=$LANG
    1.67 @@ -71,13 +75,19 @@
    1.68  		/etc/init.d/backuppc start
    1.69  		/etc/init.d/apache start
    1.70  	fi
    1.71 -	cat <<EOT
    1.72  
    1.73 -Now you should :
    1.74 -- append /etc/BackupPC/.ssh/id_rsa.pub to every unix client /root/.ssh/authorized_keys file
    1.75 -- update \$Conf{CgiAdminUsers} in /etc/BackupPC/config.pl 
    1.76 -- enable web access with 'htpasswd -c root /etc/BackupPC/BackupPC.users'
    1.77 -- update passwords in /etc/BackupPC/*.sh
    1.78 -- ... and maybe jail /var/lib/BackupPC into a xfs/noatime for ext4 users.
    1.79 +	[ -n "$quiet" ] || cat <<"EOT"
    1.80 +
    1.81 +	.-------------------------------------------------------------.
    1.82 +	| Now you should:                                             |
    1.83 +	| - append /etc/BackupPC/.ssh/id_rsa.pub to every unix client |
    1.84 +	|   /root/.ssh/authorized_keys file                           |
    1.85 +	| - update $Conf{CgiAdminUsers} in /etc/BackupPC/config.pl    |
    1.86 +	| - enable web access with                                    |
    1.87 +	|   'htpasswd -c root /etc/BackupPC/BackupPC.users'           |
    1.88 +	| - update passwords in /etc/BackupPC/*.sh                    |
    1.89 +	| - ... and maybe jail /var/lib/BackupPC into a xfs/noatime   |
    1.90 +	|   for ext4 users.                                           |
    1.91 +	'-------------------------------------------------------------'
    1.92  EOT
    1.93  }