Archived
2
0
This repository has been archived on 2024-06-24. You can view files and clone it, but cannot push or open issues or pull requests.
neko-custom/.docker/test
2020-01-28 16:45:00 +00:00

71 lines
2.0 KiB
Bash
Executable File

#!/bin/bash
# usefull debugging tools pavucontrol htop x11vnc
if [[ $EUID -ne 0 ]]; then
echo "This script must be run as root"
exit 1
fi
# if [ ! -f ../server/bin/neko ]; then
# echo "build server before testing"
# exit 1
# fi
# if [ ! -d ../client/dist/ ]; then
# echo "build client before testing"
# exit 1
# fi
sudo mkdir -p /var/run/dbus /etc/neko
sudo rm -rf /var/run/dbus.pid
sudo cp files/firefox/neko.js /usr/lib/firefox-esr/mozilla.cfg
#sudo rm -f /usr/lib/firefox-esr/mozilla.cfg
sudo cp files/firefox/autoconfig.js /usr/lib/firefox-esr/defaults/pref/autoconfig.js
#sudo rm -f /usr/lib/firefox-esr/defaults/pref/autoconfig.js
sudo cp files/firefox/policies.json /usr/lib/firefox-esr/distribution/policies.json
#sudo rm -f /usr/lib/firefox-esr/distribution/policies.json
sudo cp files/dbus /usr/bin/dbus
sudo cp files/default.pa /etc/pulse/default.pa
sudo cp files/supervisord.conf /etc/neko/supervisord.conf
sudo cp files/openbox.xml /etc/neko/openbox.xml
sudo mkdir -p /usr/lib/firefox/distribution/extensions
if [ ! -f /usr/lib/firefox/distribution/extensions/uBlock0@raymondhill.net.xpi ]; then
sudo curl -o /usr/lib/firefox/distribution/extensions/uBlock0@raymondhill.net.xpi https://addons.mozilla.org/firefox/downloads/latest/ublock-origin/addon-607454-latest.xpi
fi
if [ ! -f /usr/lib/firefox/distribution/extensions/nordvpnproxy@nordvpn.com.xpi ]; then
sudo curl -o /usr/lib/firefox/distribution/extensions/nordvpnproxy@nordvpn.com.xpi https://addons.mozilla.org/firefox/downloads/latest/nordvpn-proxy-extension/latest.xpi
fi
sudo cp ../server/bin/neko /usr/bin/neko
sudo cp -R ../client/dist /var/www/
sudo rm -rf $HOME/.mozilla
mkdir -p $HOME/.config/pulse
echo "default-server=unix:/tmp/pulseaudio.socket" > $HOME/.config/pulse/client.conf
export USER=neko
export SCREEN_WIDTH=1280
export SCREEN_HEIGHT=720
export SCREEN_DEPTH=24
export DISPLAY=:99.0
export NEKO_PASSWORD=neko
export NEKO_BIND=:8080
export NEKO_KEY=
export NEKO_CERT=
if [ -d logs ]; then
sudo rm -rf logs
fi
mkdir logs
supervisord --configuration ./supervisord.conf