summarylogtreecommitdiffstats
path: root/camalarm.install
diff options
context:
space:
mode:
authorChipster2020-05-04 16:22:00 +0200
committerChipster2020-05-04 16:22:00 +0200
commitdf2cbaf1d8988280da2b61f32bd4d109171a90dd (patch)
treece4024fc6df46dd2b2cacec726720318d5f43047 /camalarm.install
downloadaur-df2cbaf1d8988280da2b61f32bd4d109171a90dd.tar.gz
First commit
Diffstat (limited to 'camalarm.install')
-rw-r--r--camalarm.install38
1 files changed, 38 insertions, 0 deletions
diff --git a/camalarm.install b/camalarm.install
new file mode 100644
index 000000000000..6e961757af9b
--- /dev/null
+++ b/camalarm.install
@@ -0,0 +1,38 @@
+post_install() {
+ # Reload systemd
+ systemctl daemon-reload
+
+ echo "Add this 2 lines in your /etc/nginx/nginx.conf: "
+ echo " \"load_module /usr/lib/nginx/modules/ngx_http_lua_module.so;\""
+ echo " \"include /etc/nginx/sites-enabled/*;\""
+ echo
+ echo "Add nginx in systemd"
+ echo " systemctl enable nginx"
+ echo " systemctl start nginx"
+ echo
+ echo "Adding camalarm in systemd:"
+ echo " systemctl enable camalarm"
+ echo " systemctl start camalarm"
+ echo
+ echo "Adding this rule in iptables:"
+ echo " iptables -t filter -A INPUT -p tcp --dport 8090 -j ACCEPT"
+
+ true
+}
+
+post_upgrade() {
+ # Reload systemd
+ systemctl daemon-reload
+
+ true
+}
+
+pre_remove() {
+ pkgname=camalarm
+ # Remove symlink in systemd
+ systemctl disable $pkgname
+ # Reload systemctl
+ systemctl daemon-reload
+
+ true
+} \ No newline at end of file