blob: 8518fbf00a8d2ed116d7cbc6ed165c5cf11c908c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
post_install() {
gtk-update-icon-cache -q -t -f usr/share/icons/hicolor
mkdir /etc/epoptes
openssl req -batch -x509 -nodes -newkey rsa:1024 -days 3652 -keyout /etc/epoptes/server.key -out /etc/epoptes/server.crt
chmod 600 /etc/epoptes/server.key
if grep -q "epoptes" /etc/group
then
"Group 'epoptes' already exists. Skipping group's creation."
else
groupadd epoptes
echo "Group 'epoptes' has been created."
fi
echo "The installation has finished. Please bare in mind you'll have to do the following before using Epoptes:"
echo "1.- You will have to add yourself to the 'epoptes' group."
echo "2.- You will have to run as root:"
echo " 'systemctl enable epoptes-server' to enable the Epoptes server Daemon."
echo " 'systemctl enable epoptes-client' to enable the Epoptes Client Daemon"
echo "3. You may need to restart your system for everything to work."
echo "4. If you don't want to restart your system, then [after doing all of the above] you will have to run as root:"
echo " 'systemctl start epoptes-server' to start the Epoptes server Daemon."
echo " 'systemctl start epoptes-client' to start the Epoptes server Daemon."
echo "After all this you still have to log out and then log back in and now Epoptes should work without a problem."
}
post_upgrade() {
systemctl daemon-reload
}
post_remove() {
rm -rf /etc/epoptes
rm /etc/default/epoptes-client
groupdel epoptes
systemctl daemon-reload
echo "Epoptes has been removed successfully."
}
|