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

74 lines
2.1 KiB
Plaintext
Raw Normal View History

2020-01-13 21:05:38 +13:00
#!/bin/bash
# usefull debugging tools pavucontrol htop x11vnc
2020-01-28 20:07:35 +13:00
if [[ $EUID -ne 0 ]]; then
echo "This script must be run as root"
exit 1
fi
2020-01-19 12:30:09 +13:00
# 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
2020-01-13 21:05:38 +13:00
sudo mkdir -p /var/run/dbus /etc/neko
2020-01-27 14:28:39 +13:00
sudo rm -rf /var/run/dbus.pid
2020-01-13 21:05:38 +13:00
2020-01-28 20:07:35 +13:00
sudo cp files/firefox-esr/neko.js /usr/lib/firefox-esr/mozilla.cfg
#sudo rm -f /usr/lib/firefox-esr/mozilla.cfg
sudo cp files/firefox-esr/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-esr/policies.json /usr/lib/firefox-esr/distribution/policies.json
#sudo rm -f /usr/lib/firefox-esr/distribution/policies.json
2020-01-14 22:39:47 +13:00
2020-01-27 14:28:39 +13:00
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
2020-01-14 22:39:47 +13:00
2020-01-28 20:07:35 +13:00
sudo mkdir -p /usr/lib/firefox/distribution/extensions
2020-01-27 14:28:39 +13:00
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
2020-01-13 21:05:38 +13:00
fi
2020-01-28 20:07:35 +13:00
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
2020-01-13 21:05:38 +13:00
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
2020-01-28 20:07:35 +13:00
export USER=neko
2020-01-27 14:28:39 +13:00
export SCREEN_WIDTH=1280
export SCREEN_HEIGHT=720
export SCREEN_DEPTH=24
export DISPLAY=:99.0
2020-01-13 21:05:38 +13:00
export NEKO_PASSWORD=neko
2020-01-27 14:28:39 +13:00
export NEKO_BIND=:8080
2020-01-13 21:05:38 +13:00
export NEKO_KEY=
export NEKO_CERT=
2020-01-28 20:07:35 +13:00
if [ -f /var/run/supervisord.pid ]; then
sudo rm -f /var/run/supervisord.pid
fi
if [ -f supervisord.log ]; then
sudo rm -f supervisord.log
fi
2020-01-27 14:28:39 +13:00
supervisord --configuration ./supervisord.conf