Browse Source

Chown problem in new RDX

root 10 years ago
parent
commit
c8a1c67e41
2 changed files with 5 additions and 3 deletions
  1. 4 3
      BackupPC_install.sh
  2. 1 0
      rdx_manager.sh

+ 4 - 3
BackupPC_install.sh

@@ -11,7 +11,7 @@ sed -i -e "s/SELINUX=enforcing/SELINUX=disabled/g" /etc/sysconfig/selinux
 setenforce 0
 
 configure_repo() {
-	yum -y install wget vim
+	yum -y install wget vim htop nmap iftop iotop nmap screen tmux
 	cd /tmp
 	wget -c http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
 	rpm -Uvh epel-release-6-8.noarch.rpm
@@ -38,7 +38,8 @@ configure_iptables() {
 }
 
 install_backuppc() {
-	yum -y install perl-Compress-Zlib perl-Archive-Zip perl-File-RsyncP perl-suidperl openssh-clients expect httpd htpasswd backuppc lsof eject vim nmap screen smartmontools parted
+	yum -y install perl-Compress-Zlib perl-Archive-Zip perl-File-RsyncP perl-suidperl openssh-clients expect httpd htpasswd backuppc lsof eject smartmontools parted
+
 
 	chkconfig backuppc on
 	chkconfig httpd on 
@@ -55,7 +56,7 @@ install_backuppc() {
 	sed -i -e "s/$Conf{CgiAdminUsers}     = '';/$Conf{CgiAdminUsers}     = 'root';/g" /etc/BackupPC/config.pl
 	sed -i -e "s/$Conf{Language} = 'en';/$Conf{Language} = 'fr';/g" /etc/BackupPC/config.pl
 
-
+	rm -rf /var/lib/BackupPC
 	
 	/etc/init.d/httpd restart
 	/etc/init.d/backuppc restart

+ 1 - 0
rdx_manager.sh

@@ -51,6 +51,7 @@ check_rdx()
 #			/sbin/fsck.ext4 -f -y $RDX_PART 2>&1 || echo -e "[x] Error during fsck"
 			echo -e "[*] Mount $RDX_PART in $BPC_DATAS_DIR"
 			/bin/mount $RDX_PART $BPC_DATAS_DIR 2>&1 || echo -e "[x] Error during mount"
+			/bin/chown -R backuppc:root $BPC_DATAS_DIR 2>&1 || echo -e "[x] Error during chown"
 
 			if [ -d "$BPC_DATAS_DIR/pool" ]; then
 				echo -e "[*] RDX is already initilised, all is done :)"