forked from mohd-akram/item.tf
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
28 lines (27 loc) · 847 Bytes
/
Makefile
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
install:
# 1. Create user
-pw user add item.tf -c item.tf -d /nonexistent -s /usr/sbin/nologin
# 2. Setup virtualenv
python3 -m venv /usr/local/libexec/item.tf
. /usr/local/libexec/item.tf/bin/activate && \
pip install --upgrade pip && \
pip install -r requirements.txt
# 3. Link configs
touch /usr/local/etc/nginx/common
mkdir -p /usr/local/etc/nginx/sites
ln -s -f $(.CURDIR)/etc/nginx/sites/item.tf \
/usr/local/etc/nginx/sites/item.tf
ln -s -f $(.CURDIR)/etc/rc.d/itemtf \
/usr/local/etc/rc.d/itemtf
ln -s -f $(.CURDIR)/var/cron/tabs/item.tf \
/var/cron/tabs/item.tf
# 4. Start server
service itemtf restart
service nginx reload
uninstall:
-service itemtf stop
-rm -rf /usr/local/libexec/item.tf
-rm /usr/local/etc/nginx/sites/item.tf
-rm /usr/local/etc/rc.d/itemtf
-rm /var/cron/tabs/item.tf
-pw user del item.tf