summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorggilestro2019-07-02 21:55:50 +0100
committerggilestro2019-07-02 21:55:50 +0100
commitde3c25a272da639becfd6a772aa7b7f19824bd85 (patch)
tree1d3026b05f48178be653a17a53f8a9460e83985b
parent30ad348429e7f3ba70ec6bfb1b94e8a6ca7b22d7 (diff)
downloadaur-de3c25a272da639becfd6a772aa7b7f19824bd85.tar.gz
Changed data directories
Enabled NTP service at install Stop services at removal
-rw-r--r--.SRCINFO4
-rw-r--r--PKGBUILD10
-rw-r--r--ethoscope-node.install10
3 files changed, 14 insertions, 10 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 8b951fc0a6a..11096fe6d69 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = ethoscope-node
- pkgdesc = A platform from monitoring animal behaviour in real time from a raspberry pi
+ pkgdesc = A platform for monitoring animal behaviour in real time from a raspberry pi
pkgver = r1702.g1c43fc3
- pkgrel = 4
+ pkgrel = 5
url = http://lab.gilest.ro/ethoscope
install = ethoscope-node.install
arch = any
diff --git a/PKGBUILD b/PKGBUILD
index 3f0d7468177..5b75ac04fb3 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,8 +2,8 @@
pkgname=ethoscope-node
pkgver=r1702.g1c43fc3
-pkgrel=4
-pkgdesc="A platform from monitoring animal behaviour in real time from a raspberry pi"
+pkgrel=5
+pkgdesc="A platform for monitoring animal behaviour in real time from a raspberry pi"
arch=('any')
url="http://lab.gilest.ro/ethoscope"
license=('GPL3')
@@ -23,9 +23,9 @@ package() {
#creating packaging directories
install -dm0755 $pkgdir/opt
install -dm0755 $pkgdir/srv/git
- install -dm0755 $pkgdir/usr/lib/systemd/system/
- install -dm0755 $pkgdir/ethoscope_data/{results, videos, tmp}
-
+ install -dm0755 $pkgdir/usr/lib/systemd/system
+ install -dm0755 $pkgdir/ethoscope_data/{results,videos,tmp}
+
#create bare repo
git clone --bare https://github.com/gilestrolab/ethoscope.git "${pkgdir}/srv/git/ethoscope.git"
diff --git a/ethoscope-node.install b/ethoscope-node.install
index b38ff9fe767..f1d0c75f85c 100644
--- a/ethoscope-node.install
+++ b/ethoscope-node.install
@@ -18,14 +18,16 @@ post_install() {
echo "enabling NODE specific systemd service files"
systemctl enable ethoscope_node.service ethoscope_update_node.service ethoscope_backup.service ethoscope_video_backup.service
- echo "enabling the GIT server on the node"
- systemctl enable git-daemon.socket
+ echo "enabling the GIT server on the node and NTP service"
+ systemctl enable git-daemon.socket ntpd.service
#changing hostname on node
hostnamectl set-hostname node
+
+ #setting host settings on node
echo "127.0.0.1 node" > /etc/hosts
- #PLEASE REBOOT NOW.
+ echo "PLEASE REBOOT NOW."
}
## arg 1: the new package version
@@ -48,7 +50,9 @@ post_upgrade() {
# arg 1: the old package version
pre_remove() {
echo "disabling systemd service files"
+ systemctl stop ethoscope_node.service ethoscope_update_node.service ethoscope_backup.service ethoscope_video_backup.service
systemctl disable ethoscope_node.service ethoscope_update_node.service ethoscope_backup.service ethoscope_video_backup.service
+ systemctl stop git-daemon.socket
systemctl disable git-daemon.socket
}