-
Notifications
You must be signed in to change notification settings - Fork 0
/
ols-update.sh
21 lines (21 loc) · 878 Bytes
/
ols-update.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/sh
echo "OLS OpenLiteSpeed Updater por Cloud Rocket - 0.1"
mydate=$(date +"%F-%H-%M")
if [ "$( curl -s 'https://openlitespeed.org/packages/release' )" != "$( cat '/usr/local/lsws/VERSION' )" ]
then
echo "----------------------------"
echo "Openlitespeed possui uma atualização de versão disponível."
echo $( curl -s 'https://openlitespeed.org/packages/release' )
echo "----------------------------"
else
echo "----------------------------"
echo "Openlitespeed está atualizado."
echo "----------------------------"
fi
newversion=$( curl -s 'https://openlitespeed.org/packages/release' )
cp -pr /usr/local/lsws/ /usr/local/lsws-$mydate
wget https://openlitespeed.org/packages/openlitespeed-$newversion.tgz
tar zxvf openlitespeed-$newversion.tgz
cd openlitespeed
./configure --prefix=/usr/local/lsws
./install.sh