-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.sh
More file actions
32 lines (25 loc) · 1.13 KB
/
install.sh
File metadata and controls
32 lines (25 loc) · 1.13 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
#!/bin/sh
if ! command -v curl >/dev/null; then
echo "installing curl"
apt-get install curl -y
fi
if ! command -v zip >/dev/null; then
echo "installing zip"
apt-get install zip -y
fi
echo "downlading script to /usr/local/bin/bashpunchman.sh"
curl -s https://raw.githubusercontent.com/ecspresso/BashPunchMan/refs/heads/main/bashpunchman.sh -o /usr/local/bin/bashpunchman.sh
echo "downlading timer to /etc/systemd/system/bashpunchman.timer"
curl -s https://raw.githubusercontent.com/ecspresso/BashPunchMan/refs/heads/main/bashpunchman.timer -o /etc/systemd/system/bashpunchman.timer
echo "downlading service to /etc/systemd/system/bashpunchman.service"
curl -s https://raw.githubusercontent.com/ecspresso/BashPunchMan/refs/heads/main/bashpunchman.service -o /etc/systemd/system/bashpunchman.service
chmod +x /usr/local/bin/bashpunchman.sh
echo "reloading systemd daemon"
systemctl daemon-reload
echo "enabling"
sudo systemctl enable bashpunchman.service
sudo systemctl enable bashpunchman.timer
sudo systemctl start bashpunchman.timer
echo "timer and service status:"
systemctl status bashpunchman.timer
systemctl status bashpunchman.service