31 lines
1.0 KiB
Bash
Executable File
31 lines
1.0 KiB
Bash
Executable File
#!/usr/bin/bash
|
|
rsync -aP --exclude "*~" --exclude *kate-swp $1/config/ /etc/moha/
|
|
chmod a+rX -R /etc/moha
|
|
chown domotique:domotique -R /etc/moha
|
|
rsync -aP --exclude "*~" --exclude *kate-swp $1/webserver/ /var/www/html/moha/
|
|
chmod u+rX -R /var/www/html/moha/
|
|
chown apache:apache -R /var/www/html/moha
|
|
rsync -aP --exclude "*~" --exclude *kate-swp $1/daemons/ /usr/bin/
|
|
rsync -aP --exclude "*~" --exclude *kate-swp $1/systemd/ /etc/systemd/system/
|
|
mkdir /usr/share/moha
|
|
chown domotique:domotique -R /usr/share/moha
|
|
touch /var/log/moha.log
|
|
chown domotique:domotique -R /var/log/moha.log
|
|
|
|
#CREATE USER 'moha'@'localhost' IDENTIFIED BY 'MohaMysql';
|
|
#mysql -p < ./sql/moha.sql
|
|
# GRANT ALL PRIVILEGES ON * . * TO 'newuser'@'localhost';
|
|
|
|
systemctl daemon-reload
|
|
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
|
|
#must enable service
|