Remove stratux-post-start.sh. Start fancontrol and screen controller from rc.local.

pull/490/head
Christopher Young 2016-09-12 14:43:56 -04:00
rodzic 89c82762b7
commit 95c1c3669e
5 zmienionych plików z 33 dodań i 10 usunięć

Wyświetl plik

@ -1,4 +0,0 @@
#!/bin/bash
/usr/bin/stratux-screen.py start
/usr/bin/fancontrol.py start

Wyświetl plik

@ -19,8 +19,8 @@ class FanControl():
def __init__(self):
self.stdin_path = '/dev/null'
self.stdout_path = '/dev/tty'
self.stderr_path = '/dev/tty'
self.stdout_path = '/var/log/fancontrol.log'
self.stderr_path = '/var/log/fancontrol.log'
self.pidfile_path = '/var/run/fancontrol.pid'
self.pidfile_timeout = 5
def run(self):

Wyświetl plik

@ -127,6 +127,8 @@ cp -f config.txt mnt/boot/
#external OLED screen
apt-get install -y libjpeg-dev i2c-tools python-smbus python-pip python-dev python-pil python-daemon screen
#for fancontrol.py:
pip install wiringpi
cd /root
git clone https://github.com/rm-hull/ssd1306
cd ssd1306 && python setup.py install
@ -138,4 +140,4 @@ cp -f /root/stratux/test/screen/CnC_Red_Alert.ttf /etc/stratux-screen/CnC_Red_Al
#startup scripts
cp -f ../__lib__systemd__system__stratux.service mnt/lib/systemd/system/stratux.service
cp -f ../__root__stratux-pre-start.sh mnt/root/stratux-pre-start.sh
cp -f ../__root__stratux-post-start.sh mnt/root/stratux-post-start.sh
cp -f rc.local mnt/etc/rc.local

25
image/rc.local 100755
Wyświetl plik

@ -0,0 +1,25 @@
#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.
# Print the IP address
_IP=$(hostname -I) || true
if [ "$_IP" ]; then
printf "My IP address is %s\n" "$_IP"
fi
/usr/bin/fancontrol.py start
/usr/bin/stratux-screen.py start
exit 0

Wyświetl plik

@ -14,9 +14,9 @@ from daemon import runner
class StratuxScreen():
def __init__(self):
self.stdin_path = '/dev/null'
self.stdout_path = '/dev/tty'
self.stderr_path = '/dev/tty'
self.pidfile_path = '/var/run/fancontrol.pid'
self.stdout_path = '/var/log/stratux-screen.log'
self.stderr_path = '/var/log/stratux-screen.log'
self.pidfile_path = '/var/run/stratux-screen.pid'
self.pidfile_timeout = 5
def run(self):
font2 = ImageFont.truetype('/etc/stratux-screen/CnC_Red_Alert.ttf', 12)