⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.19
Server IP:
178.33.27.10
Server:
Linux cpanel.dev-unit.com 3.10.0-1160.108.1.el7.x86_64 #1 SMP Thu Jan 25 16:17:31 UTC 2024 x86_64
Server Software:
Apache/2.4.57 (Unix) OpenSSL/1.0.2k-fips
PHP Version:
8.2.11
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
proc
/
self
/
root
/
usr
/
libexec
/
openldap
/
View File Name :
upgrade-db.sh
#!/bin/sh # Author: Jan Vcelak <jvcelak@redhat.com> . /usr/libexec/openldap/functions if [ `id -u` -ne 0 ]; then error "You have to be root to run this command." exit 4 fi load_sysconfig retcode=0 for dbdir in `databases`; do upgrade_log="$dbdir/db_upgrade.`date +%Y%m%d%H%M%S`.log" bdb_files=`find "$dbdir" -maxdepth 1 -name "*.bdb" -printf '"%f" '` # skip uninitialized database [ -z "$bdb_files"] || continue printf "Updating '%s', logging into '%s'\n" "$dbdir" "$upgrade_log" # perform the update for command in \ "/usr/bin/db_recover -v -h \"$dbdir\"" \ "/usr/bin/db_upgrade -v -h \"$dbdir\" $bdb_files" \ "/usr/bin/db_checkpoint -v -h \"$dbdir\" -1" \ ; do printf "Executing: %s\n" "$command" &>>$upgrade_log run_as_ldap "$command" &>>$upgrade_log result=$? printf "Exit code: %d\n" $result >>"$upgrade_log" if [ $result -ne 0 ]; then printf "Upgrade failed: %d\n" $result retcode=1 fi done done exit $retcode