forked from DFabric/DPlatform-Shell
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTheLounge.sh
More file actions
23 lines (15 loc) · 753 Bytes
/
TheLounge.sh
File metadata and controls
23 lines (15 loc) · 753 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/sh
[ $1 = update ] && { npm udpate shout; whiptail --msgbox "The Lounge updated!" 8 32; exit; }
[ $1 = remove ] && { sh sysutils/service.sh remove TheLounge; npm uninstall thelounge; userdel thelounge; whiptail --msgbox "The Lounge removed!" 8 32; exit; }
# Define port
port=$(whiptail --title "The Lounge port" --inputbox "Set a port number for Shout" 8 48 "9000" 3>&1 1>&2 2>&3)
[ "$port" != "" ] && port_arg=" --port $port"
. sysutils/Node.js.sh
# Add thelounge user
useradd thelounge
# Install
npm install -g thelounge
# Add SystemD process and run the server
sh sysutils/service.sh TheLounge "/usr/bin/node /usr/bin/lounge$port_arg" / thelounge
whiptail --msgbox "The Lounge installed!
Open http://$URL:$port in your browser." 10 64