-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathinstall.sh
31 lines (22 loc) · 815 Bytes
/
install.sh
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
#!/bin/bash
function social {
echo "Installing social ..."
apt-get install jq -y
cd /etc/social
LATEST_VERSION=$(curl --silent "https://api.github.com/repos/voocel/social/releases/latest" | jq '.tag_name' | sed -E 's/.*"([^"]+)".*/\1/' | tr -d v)
curl -sL https://github.com/voocel/social/releases/download/v{$LATEST_VERSION}/social_{$LATEST_VERSION}_Linux_x86_64.tar.gz | tar xz
echo "[Unit]
Description=Social
Documentation=https://github.com/voocel/social
[Service]
ExecStart=/etc/social/social server -c /etc/social/config.yml
Restart=on-failure
RestartSec=2
[Install]
WantedBy=multi-user.target" > /etc/systemd/system/social.service
systemctl daemon-reload
systemctl enable social.service
systemctl start social.service
echo "Social installation done!"
}
social