-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.sh
More file actions
22 lines (18 loc) · 842 Bytes
/
install.sh
File metadata and controls
22 lines (18 loc) · 842 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/usr/bin/env sh
systemctl -q is-active acyonp && { echo "ERROR: acyonp service is still running. Please run \"sudo systemctl stop acyonp\" to stop it."; exit 1; }
[ "$(id -u)" -eq 0 ] || { echo "You need to be ROOT (sudo can be used)"; exit 1; }
#
mkdir -p /usr/local/sbin/
mkdir -p /var/log/acyonp/
install -m 644 acyonp.service /etc/systemd/system/acyonp.service
install -m 755 acyonp_py2.py /usr/local/sbin/acyonp_py2.py
install -m 644 acyonp.ini /etc/acyonp.ini
install -m 644 uninstall.sh /usr/local/sbin/uninstall-acyonp.sh
systemctl daemon-reload
systemctl enable acyonp
systemctl start acyonp
# cron
#install -m 755 rtsa.hourly /etc/cron.hourly/rtsa
install -m 644 acyonp.logrotate /etc/logrotate.d/acyonp
echo "##### acyonp installed #####"
echo "##### edit /etc/acyonp.ini to configure options ####"