-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathupdate.sh
More file actions
56 lines (54 loc) · 2.56 KB
/
update.sh
File metadata and controls
56 lines (54 loc) · 2.56 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
#!/bin/bash
echo -e "
▄▄▄ █ ██ ██▀███ ▒█████ ██▀███ ▄▄▄
▒████▄ ██ ▓██▒▓██ ▒ ██▒▒██▒ ██▒▓██ ▒ ██▒▒████▄
▒██ ▀█▄ ▓██ ▒██░▓██ ░▄█ ▒▒██░ ██▒▓██ ░▄█ ▒▒██ ▀█▄
░██▄▄▄▄██ ▓▓█ ░██░▒██▀▀█▄ ▒██ ██░▒██▀▀█▄ ░██▄▄▄▄██
▓█ ▓██▒▒▒█████▓ ░██▓ ▒██▒░ ████▓▒░░██▓ ▒██▒ ▓█ ▓██▒
▒▒ ▓▒█░░▒▓▒ ▒ ▒ ░ ▒▓ ░▒▓░░ ▒░▒░▒░ ░ ▒▓ ░▒▓░ ▒▒ ▓▒█░
▒ ▒▒ ░░░▒░ ░ ░ ░▒ ░ ▒░ ░ ▒ ▒░ ░▒ ░ ▒░ ▒ ▒▒ ░
░ ▒ ░░░ ░ ░ ░░ ░ ░ ░ ░ ▒ ░░ ░ ░ ▒
░ ░ ░ ░ ░ ░ ░ ░ ░
-Update Script-
@AndrewMohawk
"
INSTALLDIR="/opt/Aurora"
if [[ $EUID -ne 0 ]]; then
echo "This script must be run as root, please use sudo"
exit 1
fi
if [ ! -d "$INSTALLDIR" ]
then
echo "Directory $INSTALLDIR Does not exist. Please run install first or update the install directory"
exit 1
fi
cd $INSTALLDIR
if [ -d .git ]; then
echo "[+] Git Cloning Aurora base"
echo "------------------------------"
git pull
echo "[+] Stopping Aurora"
echo "------------------------------"
service aurora stop
echo "[+] Service Status"
echo "------------------------------"
echo "Aurora status: `systemctl is-active aurora.service`"
echo "[+] Starting Aurora"
echo "------------------------------"
service aurora start
echo "[+] Service Status"
echo "------------------------------"
echo "Aurora status: `systemctl is-active aurora.service`"
echo "[+] Last 20 lines of aurora log"
echo "------------------------------"
journalctl -u aurora -n 20 --no-pager
echo -e "
___ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___
(___|___|___|___|___|___|___|___|___|___|___|___)
"
echo "Complete. You can now browse to the web interface to configure any changes you may need."
localip=$(hostname -I)
echo "This will likely be: http://$localip"
else
echo "This install directory ($INSTALLDIR) is *NOT* a git repo."
fi;