blob: 10d4e6c3b58d615bca1887a3ba80f5c5e9eed739 (
plain)
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
pkgname="iptv-sources-git"
_pkgname="iptv-sources"
post_install() {
cat <<EOF
PM2 configuration for ${pkgname} has been installed.
You can review and modify configuration at /etc/pm2/conf.d/${_pkgname}.json.
Detail Environment Variables at https://github.com/HerbertHe/iptv-sources.
You can manually start the services using the following commands:
sudo pm2 start /etc/pm2/conf.d/${_pkgname}.json
sudo pm2 save
Then you can use it with http://127.0.0.1:8080 or http://[::1]:8080.
To enable PM2 startup on boot, run:
sudo pm2 startup
Refer to the PM2 documentation for more details:
https://pm2.keymetrics.io/docs/usage/quick-start
Enjoy!
EOF
}
post_upgrade() {
cat <<EOF
PM2 configuration for ${pkgname} has been updated.
If the services are already running, restart them manually using:
sudo pm2 delete ${_pkgname}-serve
sudo pm2 delete ${_pkgname}-m3u
sudo pm2 start /etc/pm2/conf.d/${_pkgname}.json
sudo pm2 save
EOF
}
pre_remove() {
cat <<EOF
If you no longer need the PM2 services, remove them manually using:
sudo pm2 delete ${_pkgname}-serve
sudo pm2 delete ${_pkgname}-m3u
sudo pm2 save
This ensures a clean removal of PM2 configurations.
EOF
}
|