-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathpostinst
More file actions
36 lines (26 loc) · 688 Bytes
/
postinst
File metadata and controls
36 lines (26 loc) · 688 Bytes
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
#!/bin/bash
set -o errexit
# Only run in the configure phase of the Debian package.
[[ "$1" != "configure" ]] && exit 0
systemctl daemon-reload
hostnamectl set-hostname winterman
enabled_units=(
"ssh.service"
"winterman-autossh@canyon.service"
"winterman-apt.timer"
"winterman-apt.service"
"ddclient.service"
)
currently_enabled_units="$(systemctl list-unit-files --state=enabled)"
for unit in "${enabled_units[@]}"; do
[[ "${currently_enabled_units}" == *"${unit}"* ]] && continue
systemctl enable "${unit}"
systemctl start "${unit}"
done
pip_packages=(
"deepspeech"
)
for package in "${pip_packages[@]}"; do
pip3 install "${package}" --upgrade
done
exit 0