-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathissabel-firstboot
More file actions
executable file
·69 lines (58 loc) · 2.03 KB
/
issabel-firstboot
File metadata and controls
executable file
·69 lines (58 loc) · 2.03 KB
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
62
63
64
65
66
67
68
69
#!/bin/bash
#
# issabel-firstboot This shell script sets up the various MySQL databases for the
# modules that need an initialized database to work. Other tasks
# to be performed on first boot should be placed here.
#
# chkconfig: 2345 66 1
# description: Issabel setup for first boot.
# Source function library.
# . /etc/rc.d/init.d/functions
# Source networking configuration.
. /etc/sysconfig/network
# Currently this is dead code
issabel_activate_firewall(){
salida=1
dialog --colors --title "\Z1 Attention" --backtitle "Issabel Firewall Settings" --ok-label "Continue" --msgbox "Default Firewall Rules will be activated on the system upon finishing the installation.\n\nIf you want to review or modify the applied rules, you can do so\nin the web GUI by navigating to:\n\nSecurity > Firewall" 12 70
if [ -f "/usr/share/issabel/privileged/fwconfig" ]; then
/usr/bin/issabel-helper fwconfig --load 2>&1
tmp=$?
if [ $tmp -eq 0 ]; then
sqlite3 /var/www/db/iptables.db "update tmp_execute set first_time = 0 ,exec_in_sys = 1" > /dev/null 2>&1
if [ $? -eq 0 ]; then
echo "Firewall actived successfully."
salida=0
fi
else
echo "Firewall can't be actived. Please activated your Firewall from from Issabel web interface: Security > Firewall > Firewall Rules."
fi
else
echo "Firewall can't be actived. Don't exits file /usr/share/issabel/privileged/fwconfig"
fi
return $salida
}
start() {
ret=0
/usr/bin/issabel-admin-passwords --init
ret=$?
/sbin/amportal chown >/dev/null 2>&1
[ $ret -eq 0 -a -d /var/lock/subsys ] && touch /var/lock/subsys/issabel-firstboot
return $ret
}
stop(){
[ -f "/var/lock/subsys/issabel-firstboot" ] && rm -f /var/lock/subsys/issabel-firstboot
return 0
}
# See how we were called.
case "$1" in
start)
start
;;
stop)
stop
;;
*)
echo $"Usage: $0 {start|stop}"
exit 1
esac
exit $?