@@ -18,7 +18,7 @@ INSTALL_DIR='/srv/lwp'
18
18
19
19
if [[ -d " $INSTALL_DIR " ]]; then
20
20
echo " You already have LXC Web Panel installed. You'll need to remove $INSTALL_DIR if you want to install"
21
- exit
21
+ exit 1
22
22
fi
23
23
24
24
echo ' Installing requirement...'
@@ -53,13 +53,12 @@ hash git &> /dev/null || {
53
53
54
54
git clone https://github.com/lxc-webpanel/LXC-Web-Panel.git " $INSTALL_DIR "
55
55
56
- echo -e ' \nInstallation complete !\n\n'
56
+ echo -e ' \nInstallation complete!\n\n'
57
+
57
58
58
- read -p ' Would you want to add LXC Web Panel to init.d for auto start ? [Y/n] ' CONFIRM
59
+ echo ' Adding /etc/ init.d/lwp... '
59
60
60
- if [[ " $CONFIRM " =~ ^([yY][eE][sS]| [yY]| ' ' )$ ]]; then
61
- echo ' Adding /etc/init.d/lwp...'
62
- cat > ' /etc/init.d/lwp' << EOF
61
+ cat > ' /etc/init.d/lwp' << EOF
63
62
#!/bin/bash
64
63
# Copyright (c) 2013 LXC Web Panel
65
64
# All rights reserved.
@@ -115,16 +114,15 @@ case "\$1" in
115
114
;;
116
115
*)
117
116
echo 'Usage: /etc/init.d/lwp {start|stop|restart}'
118
- echo 'Do not use service for this please !'
119
117
exit 0
120
118
;;
121
119
esac
122
120
123
121
exit 0
124
122
EOF
125
- chmod +x ' /etc/init.d/lwp '
126
- update-rc.d lwp defaults & > /dev/null
127
- echo ' Done '
128
- /etc/init.d/lwp start
129
- echo ' Connect you on http://your-ip-address:5000/ '
130
- fi
123
+
124
+ chmod +x ' /etc/init.d/lwp '
125
+ update-rc.d lwp defaults & > /dev/null
126
+ echo ' Done '
127
+ /etc/init.d/lwp start
128
+ echo ' Connect you on http://your-ip-address:5000/ '
0 commit comments