Search
j0ke.net Open Build Service
>
Projects
>
internetx
:
managed
:
testing
>
ix-rsyncbackup
> _service:set_version:ix-rsyncbackup.spec
Sign Up
|
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
File _service:set_version:ix-rsyncbackup.spec of Package ix-rsyncbackup (Revision 4)
Currently displaying revision
4
,
show latest
%define pkgname rsyncbackup %define buser ix-rbackup %define bgrp ix-rbackup Name: ix-rsyncbackup Summary: InterNetX GmbH Rsync Backup Script Version: 0.0.rev1119 Release: 0 Url: http://www.internetx.de License: GPLv2 Group: System Environment Source0: %{pkgname}-%{version}.tar BuildRoot: %{_tmppath}/%{name}-%{version}-root %if 0%{?rhel_version} || 0%{?centos_version} || 0%{?sl_version} || 0%{?redhat_version} Requires: vixie-cron shadow-utils sudo rsync psa-automysqlbackup BuildRequires: vixie-cron shadow-utils %endif %if 0%{?suse_version} Requires: cron pwdutils sudo rsync psa-automysqlbackup BuildRequires: cron pwdutils %endif BuildArch: noarch %description ix-rsyncbackup saves daily disaster/full backup to InterNetX GmbH RSYNC Backup space. This is the local configuration package which sets up the environment. %prep %setup -n %{pkgname}-%{version} %build %install %__install -D -m755 validate-rsync.sh %{buildroot}/home/%{buser}/bin/validate-rsync.sh %__install -D -m755 rsync-wrapper.sh %{buildroot}/home/%{buser}/bin/rsync-wrapper.sh %__install -D -m600 authorized_keys %{buildroot}/home/%{buser}/.ssh/authorized_keys %__install -D -m644 automysqlbackup.cron %{buildroot}%{_sysconfdir}/cron.d/automysqlbackup %pre getent group %{bgrp} >/dev/null || groupadd -r %{bgrp} getent passwd %{buser} >/dev/null || useradd -r -g %{bgrp} -d /home/%{buser} -s /bin/bash -c "InterNetX GmbH System Backup" %{buser} exit 0 %post if [ -f /etc/sudoers ] ; then if [ -z "`grep ^%{buser} /etc/sudoers`" ] ; then echo "%{buser} ALL = NOPASSWD: /usr/bin/rsync" >> /etc/sudoers fi fi %postun if [ $1 == 0 ] ; then userdel -r -f %{buser} groupdel %{bgrp} fi %clean rm -rf %{buildroot} %files %defattr(-,%{buser},%{bgrp}) /home/%{buser}/bin/*.sh /home/%{buser}/.ssh/authorized_keys %defattr(-,root,root) %config %{_sysconfdir}/cron.d/automysqlbackup %changelog