mirror of
https://github.com/dbarzin/pandora-box.git
synced 2025-07-19 05:19:40 +02:00
work in progress
This commit is contained in:
parent
e90deb3bfb
commit
baeb8a943c
2 changed files with 12 additions and 14 deletions
22
install.sh
22
install.sh
|
@ -20,7 +20,7 @@ cd redis
|
|||
git checkout 6.2
|
||||
make
|
||||
# Optionally, you can run the tests:
|
||||
make test
|
||||
# make test
|
||||
cd ..
|
||||
|
||||
chown -R $SUDO_USER redis
|
||||
|
@ -34,7 +34,7 @@ cd kvrocks
|
|||
git checkout 2.0
|
||||
make -j4
|
||||
# Optionally, you can run the tests:
|
||||
make test
|
||||
# make test
|
||||
cd ..
|
||||
|
||||
chown -R $SUDO_USER kvrocks
|
||||
|
@ -74,10 +74,9 @@ wget http://cdn.download.comodo.com/av/updates58/sigs/bases/bases.cav -O /opt/CO
|
|||
|
||||
# Workers
|
||||
|
||||
for file in pandora/workers/*.sample; do cp -i ${file} ${file%%.sample}; done
|
||||
|
||||
chown -R $SUDO_USER .
|
||||
|
||||
su - $SUDO_USER -c "cd pandora; for file in pandora/workers/*.sample; do cp -i ${file} ${file%%.sample}; done"
|
||||
# remove not working
|
||||
su - $SUDO_USER -c "cd pandora; rm pandora/workers/yara*.yml"
|
||||
su - $SUDO_USER -c "cd pandora; poetry run update --yes"
|
||||
|
||||
#---------------------
|
||||
|
@ -97,6 +96,8 @@ apt install -y imagemagick pmount
|
|||
|
||||
# Suppress all messages from the kernel (and its drivers) except panic messages from appearing on the console.
|
||||
echo "kernel.printk = 3 4 1 3" | tee -a /etc/sysctl.conf
|
||||
# Set Permanently ulimit -n / open files in ubuntu
|
||||
echo "fs.file-max = 65535" | tee -a /etc/sysctl.conf
|
||||
|
||||
# allow write to /dev/fb0
|
||||
usermod -a -G video $SUDO_USER
|
||||
|
@ -105,10 +106,10 @@ usermod -a -G video $SUDO_USER
|
|||
usermod -a -G input $SUDO_USER
|
||||
|
||||
# Start Poetry at boot
|
||||
echo "su - $SUDO_USER -c \"cd /home/$SUDO_USER/pandora ; poetry run start\"" > /etc/rc.local
|
||||
echo "su - $SUDO_USER -c \"cd pandora ; poetry run update -yes\"" > /etc/rc.local
|
||||
chmod +x /etc/rc.local
|
||||
|
||||
# Getty1 autostart
|
||||
# getty1 autostart
|
||||
mkdir -p /etc/systemd/system/getty@tty1.service.d
|
||||
echo "[Service]" > /etc/systemd/system/getty@tty1.service.d/override.conf
|
||||
echo "ExecStart=" >> /etc/systemd/system/getty@tty1.service.d/override.conf
|
||||
|
@ -117,9 +118,6 @@ echo "StandardInput=tty" >> /etc/systemd/system/getty@tty1.service.d/override.co
|
|||
echo "StandardOutput=tty" >> /etc/systemd/system/getty@tty1.service.d/override.conf
|
||||
echo "Type=idle" >> /etc/systemd/system/getty@tty1.service.d/override.conf
|
||||
|
||||
# Update pandora now
|
||||
su - $SUDO_USER -c "cd /home/$SUDO_USER/pandora ; poetry run update --yes"
|
||||
|
||||
# Then reboot !
|
||||
reboot
|
||||
|
||||
|
||||
|
|
|
@ -436,7 +436,7 @@ def scan(mount_point, used):
|
|||
res = pandora.submit_from_disk(full_path)
|
||||
time.sleep(0.1)
|
||||
loop = 0
|
||||
while True and (loop < 60):
|
||||
while True and (loop < 960):
|
||||
res = pandora.task_status(res["taskId"])
|
||||
status = res["status"]
|
||||
if status != "WAITING":
|
||||
|
@ -448,7 +448,7 @@ def scan(mount_point, used):
|
|||
file,
|
||||
human_readable_size(file_size),
|
||||
status,
|
||||
(file_scan_end_time - file_scan_start_time)))
|
||||
(file_scan_end_time - file_scan_start_time)))
|
||||
scanned += os.path.getsize(full_path)
|
||||
file_count += 1
|
||||
update_bar(scanned * 100 // used)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue