mirror of
https://github.com/dbarzin/pandora-box.git
synced 2025-07-19 13:29:42 +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
|
git checkout 6.2
|
||||||
make
|
make
|
||||||
# Optionally, you can run the tests:
|
# Optionally, you can run the tests:
|
||||||
make test
|
# make test
|
||||||
cd ..
|
cd ..
|
||||||
|
|
||||||
chown -R $SUDO_USER redis
|
chown -R $SUDO_USER redis
|
||||||
|
@ -34,7 +34,7 @@ cd kvrocks
|
||||||
git checkout 2.0
|
git checkout 2.0
|
||||||
make -j4
|
make -j4
|
||||||
# Optionally, you can run the tests:
|
# Optionally, you can run the tests:
|
||||||
make test
|
# make test
|
||||||
cd ..
|
cd ..
|
||||||
|
|
||||||
chown -R $SUDO_USER kvrocks
|
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
|
# Workers
|
||||||
|
|
||||||
for file in pandora/workers/*.sample; do cp -i ${file} ${file%%.sample}; done
|
su - $SUDO_USER -c "cd pandora; for file in pandora/workers/*.sample; do cp -i ${file} ${file%%.sample}; done"
|
||||||
|
# remove not working
|
||||||
chown -R $SUDO_USER .
|
su - $SUDO_USER -c "cd pandora; rm pandora/workers/yara*.yml"
|
||||||
|
|
||||||
su - $SUDO_USER -c "cd pandora; poetry run update --yes"
|
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.
|
# 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
|
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
|
# allow write to /dev/fb0
|
||||||
usermod -a -G video $SUDO_USER
|
usermod -a -G video $SUDO_USER
|
||||||
|
@ -105,10 +106,10 @@ usermod -a -G video $SUDO_USER
|
||||||
usermod -a -G input $SUDO_USER
|
usermod -a -G input $SUDO_USER
|
||||||
|
|
||||||
# Start Poetry at boot
|
# 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
|
chmod +x /etc/rc.local
|
||||||
|
|
||||||
# Getty1 autostart
|
# getty1 autostart
|
||||||
mkdir -p /etc/systemd/system/getty@tty1.service.d
|
mkdir -p /etc/systemd/system/getty@tty1.service.d
|
||||||
echo "[Service]" > /etc/systemd/system/getty@tty1.service.d/override.conf
|
echo "[Service]" > /etc/systemd/system/getty@tty1.service.d/override.conf
|
||||||
echo "ExecStart=" >> /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 "StandardOutput=tty" >> /etc/systemd/system/getty@tty1.service.d/override.conf
|
||||||
echo "Type=idle" >> /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
|
reboot
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -436,7 +436,7 @@ def scan(mount_point, used):
|
||||||
res = pandora.submit_from_disk(full_path)
|
res = pandora.submit_from_disk(full_path)
|
||||||
time.sleep(0.1)
|
time.sleep(0.1)
|
||||||
loop = 0
|
loop = 0
|
||||||
while True and (loop < 60):
|
while True and (loop < 960):
|
||||||
res = pandora.task_status(res["taskId"])
|
res = pandora.task_status(res["taskId"])
|
||||||
status = res["status"]
|
status = res["status"]
|
||||||
if status != "WAITING":
|
if status != "WAITING":
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue