epic-ukulele
[xhome.git] / TestXfhem / bin / install-sysal-stub
1 #!/bin/bash
2 set -e
3
4 # test if already installed
5 if [ -e /etc/apache2/sites-enabled/sysal_stub.conf ]
6 then
7         exit
8 fi
9
10 cwd=$(pwd)
11 # write apache conf
12 echo "# Apache conf for sysal stub
13 Alias /sysal/rest/AlarmInterface/RemoteWatchdog $cwd/bin/sysal-stub.pl
14 <Directory $cwd/bin>
15        Require all granted
16        Options +ExecCGI
17        AddHandler cgi-script .pl
18 </Directory>
19 " > /etc/apache2/sites-available/sysal_stub.conf
20 a2ensite sysal_stub
21
22 systemctl restart apache2
23