1
0
moha/tools/install.sh

31 lines
1.0 KiB
Bash
Raw Permalink Normal View History

#!/usr/bin/bash
rsync -aP --exclude "*~" --exclude *kate-swp $1/config/ /etc/moha/
2022-04-23 02:00:52 +02:00
chmod a+rX -R /etc/moha
chown domotique:domotique -R /etc/moha
rsync -aP --exclude "*~" --exclude *kate-swp $1/webserver/ /var/www/html/moha/
2022-04-23 02:00:52 +02:00
chmod u+rX -R /var/www/html/moha/
chown apache:apache -R /var/www/html/moha
2022-09-01 17:02:28 +02:00
rsync -aP --exclude "*~" --exclude *kate-swp $1/daemons/ /usr/bin/
rsync -aP --exclude "*~" --exclude *kate-swp $1/systemd/ /etc/systemd/system/
2022-09-09 17:56:14 +02:00
mkdir /usr/share/moha
chown domotique:domotique -R /usr/share/moha
2022-09-09 18:13:03 +02:00
touch /var/log/moha.log
chown domotique:domotique -R /var/log/moha.log
2022-09-09 18:46:50 +02:00
#CREATE USER 'moha'@'localhost' IDENTIFIED BY 'MohaMysql';
#mysql -p < ./sql/moha.sql
# GRANT ALL PRIVILEGES ON * . * TO 'newuser'@'localhost';
2022-09-09 17:56:14 +02:00
systemctl daemon-reload
2022-12-05 12:23:43 +01:00
R=`systemctl is-enabled presenceD.service`
if [ $R != "enabled" ];then
echo "enabling presenceD.service"
systemctl enable presenceD.service
fi
R=`systemctl is-enabled moha.service`
if [ $R != "enabled" ];then
echo "enabling moha.service"
systemctl enable moha.service
fi
2022-09-01 17:02:28 +02:00
#must enable service