Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- cat > ./html/.htaccess << 'EOF'
- AuthUserFile /var/hda/web-apps/http.users
- AuthGroupFile /dev/null
- AuthName "User Login Required for This Area"
- AuthType Basic
- <Limit GET POST>
- require valid-user
- </Limit>
- EOF
- htpasswd -c -b ../http.users backuppc password;
- mkdir -p elevated;
- cd elevated;
- cat > backuppc-install-script << 'EOF'
- chown apache:users ../html/.htaccess;
- mv /etc/httpd/conf.d/BackupPC.conf /etc/httpd/conf.d/BackupPC.conf.bak;
- echo "hda 0 backuppc" >> /etc/BackupPC/hosts;
- sed -i "1922s|''|'admin'|" /etc/BackupPC/config.pl;
- sed -i "1923s|''|'backuppc'|" /etc/BackupPC/config.pl;
- /sbin/service backuppc restart;
- EOF
- chmod +x backuppc-install-script;
- sudo ./backuppc-install-script;
- cd ..;
- rm -rf elevated;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement