-
Notifications
You must be signed in to change notification settings - Fork 0
/
install
24 lines (23 loc) · 926 Bytes
/
install
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/bin/bash
python2 manage.py syncdb
echo "The next part of the installation requires root permission. Please enter root password to continue."
su
echo "Creating symlinks to powermonitorweb.server, startupjobs, and logservice..."
curpath=`pwd`
logservice=$curpath'/logservice.py'
startupjobs=$curpath'/startupjobs.py'
powermonitorweb=$curpath'/powermonitorweb.server'
ln -s $logservice /usr/bin/logservice.py
ln -s $startupjosb /usr/bin/startupjobs.py
ln -s $powermonitorweb /usr/bin/powermonitorweb.server
echo "Linking Complete"
# Create and start systemd services for logservice and startupjobs
echo "Enabling and starting systemd startup services..."
cp *.service /etc/systemd/system/
systemctl enable logservice.service
systemctl enable startupjobs.service
systemctl enable powermonitorweb.service
systemctl start logservice.service
systemctl start startupjobs.service
systemctl start powermonitorweb.service
echo "DONE"