-
Notifications
You must be signed in to change notification settings - Fork 1
/
install.sh
executable file
·61 lines (44 loc) · 1.25 KB
/
install.sh
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#!/bin/bash
# Appie installation script
#
echo "Installing Appie!"
echo ""
source `dirname $0`/includes
while [ -z "$APP_BASE" ]; do
read -p "Please specify the location of APP_BASE: " APP_BASE
done
if [ -d "$APP_BASE" ]; then
echo "It seems like $APP_BASE already exists"
read -p "Proceed using $APP_BASE as APP_BASE? [y|N]: " PROCEED
if [ "${PROCEED}" != "y" ]; then
echo "Exiting!"
exit 10
fi
fi
if [ `groupExists appadmin` = "false" ]; then
if [ `isWritable /etc/group` != "true" ]; then
echo "It seems you can't add groups... try again as root"
exit 1
fi
echo "Creating group appadmin"
groupadd appadmin
else
echo "Group appadmin already exists"
fi
mkdir -p $APP_BASE
chgrp appadmin $APP_BASE
chmod 775 $APP_BASE
mkdir -p var
echo "Summarize:
created $APP_BASE with mode drwxrws---
created group appadmin
set group of $APP_BASE to appadmin
You may want to add users to the appadmin group, so as they can
actually USE appie...
Do this using usermod -a -G <group> <user id>
Also, READ the INSTALL file for some info on /etc/sudoers changes...
Yes, some reading is involved.
Please copy appie.conf.template to appie.conf, and adjust the
variables if needed.
Don't say I didn't tell you so!!!!!!!!!!!!!!!!!!!!!
"