diff options
author | ggilestro | 2019-07-06 09:15:18 +0100 |
---|---|---|
committer | ggilestro | 2019-07-06 09:15:18 +0100 |
commit | f20a100074d216dfbed4b69944e24f5bbbd95c2a (patch) | |
tree | 3ec57bbcacaacd908221df7420c80153866de195 | |
parent | bec81972cb9f546c31e9545aa3b9ab5b56cca29b (diff) | |
download | aur-f20a100074d216dfbed4b69944e24f5bbbd95c2a.tar.gz |
Modified the post install hook to fix the netctl services
-rw-r--r-- | .SRCINFO | 2 | ||||
-rw-r--r-- | PKGBUILD | 4 | ||||
-rw-r--r-- | ethoscope-device.install | 52 |
3 files changed, 33 insertions, 25 deletions
@@ -1,7 +1,7 @@ pkgbase = ethoscope-device pkgdesc = A platform from monitoring animal behaviour in real time from a raspberry pi - Device version pkgver = r1702.g1c43fc3 - pkgrel = 3 + pkgrel = 4 url = http://lab.gilest.ro/ethoscope install = ethoscope-device.install arch = any @@ -2,7 +2,7 @@ pkgname=ethoscope-device pkgver=r1702.g1c43fc3 -pkgrel=3 +pkgrel=4 pkgdesc="A platform from monitoring animal behaviour in real time from a raspberry pi - Device version" arch=('any') url="http://lab.gilest.ro/ethoscope" @@ -35,7 +35,7 @@ package() { ln -s /opt/ethoscope-device/scripts/ethoscope_updater "${pkgdir}/opt/" #install python service - cd "${srcdir}/${pkgname}/node_src" + cd "${srcdir}/${pkgname}/src" #pip install -e . --install-option="--prefix=${pkgdir}" --no-deps python setup.py install --root="$pkgdir/" --optimize=1 --skip-build diff --git a/ethoscope-device.install b/ethoscope-device.install index 60b98982213a..23ed634067f6 100644 --- a/ethoscope-device.install +++ b/ethoscope-device.install @@ -12,39 +12,47 @@ post_install() { echo "setting GIT branch" git checkout python3.7 + echo "installing python package" + cd /opt/ethoscope-device/src + python setup.py install + echo "create 000 machine files" echo "ETHOSCOPE_000" > /etc/machine-name echo "ETHOSCOPE_000" > /etc/hostname echo "create a default wlan0 file" - echo 'Description=ethoscope_wifi network' > /etc/netctl/wlan0 - echo 'Interface=wlan0' >> /etc/netctl/wlan0 - echo 'Connection=wireless' >> /etc/netctl/wlan0 - echo 'Security=wpa' >> /etc/netctl/wlan0 - echo 'IP=dhcp' >> /etc/netctl/wlan0 - echo 'TimeoutDHCP=60' >> /etc/netctl/wlan0 - echo "ESSID=ETHOSCOPE_WIFI" >> /etc/netctl/wlan0 - echo "Key=ETHOSCOPE_1234" >> /etc/netctl/wlan0 + echo "Description='ethoscope_wifi'" > /etc/netctl/wlan + echo "Interface=wlan0" >> /etc/netctl/wlan + echo "Connection=wireless" >> /etc/netctl/wlan + echo "Security=wpa" >> /etc/netctl/wlan + echo "IP=dhcp" >> /etc/netctl/wlan + echo "TimeoutDHCP=60" >> /etc/netctl/wlan + echo "ESSID=ETHOSCOPE_WIFI" >> /etc/netctl/wlan + echo "Key=ETHOSCOPE_1234" >> /etc/netctl/wlan echo "create a default eth0 file" - echo 'Description=eth0 Network' > /etc/netctl/eth0 - echo 'Interface=eth0' >> /etc/netctl/eth0 - echo 'Connection=ethernet' >> /etc/netctl/eth0 - echo 'IP=dhcp' >> /etc/netctl/eth0 + echo "Description='Ethernet'" > /etc/netctl/ether + echo "Interface=eth0" >> /etc/netctl/ether + echo "Connection=ethernet" >> /etc/netctl/ether + echo "IP=dhcp" >> /etc/netctl/ether echo "use netctl instead of netword" + systemctl stop systemd-networkd systemctl disable systemd-networkd ip link set eth0 down - - echo "setting up wifi" - netctl-auto enable wlan0 - netctl-auto start wlan0 - systemctl enable netctl-auto@wlan0.service - systemctl start netctl-auto@wlan0.service + ip link set wlan0 down + + netctl enable ether + netctl enable wlan + +# netctl-auto enable wlan0 +# netctl-auto start wlan0 +# systemctl enable netctl-auto@wlan0.service +# systemctl start netctl-auto@wlan0.service + systemctl enable netctl-ifplugd@wlan0.service systemctl start netctl-ifplugd@wlan0.service - netctl enable eth0 - netctl start eth0 + systemctl enable netctl@eth0.service systemctl start netctl@eth0.service systemctl enable netctl-ifplugd@eth0.service @@ -61,11 +69,11 @@ post_install() { echo "enabling DEVICE specific systemd service files" systemctl enable ethoscope_device.service ethoscope_update.service - systemctl enable ntpd.service mysqld.service fake-hwclock fake-hwclock-save.timer sshd.service + systemctl enable ntpd.service mysqld.service fake-hwclock fake-hwclock-save.timer sshd.service mysqld.service echo "Set up mysql database" mysql_install_db --user=mysql --basedir=/usr --datadir=/var/lib/mysql - systemctl enable mysqld.service + systemctl start mysqld.service mysql -u root -e "CREATE USER 'ethoscope'@'localhost' IDENTIFIED BY 'ethoscope'" mysql -u root -e "CREATE USER 'ethoscope'@'%' IDENTIFIED BY 'ethoscope'" mysql -u root -e "GRANT ALL PRIVILEGES ON *.* TO 'ethoscope'@'localhost' WITH GRANT OPTION"; |