gjdwebserver-overlay/app-mobilephone/pinephone-modem-scripts/files/pinephone-modem-scripts.install
Gerben Jan Dijkman 8d7b56aa01 Version bump
2022-01-19 14:27:11 +01:00

23 lines
619 B
Plaintext

msg() {
ALL_OFF="\e[1;0m"
BOLD="\e[1;1m"
GREEN="${BOLD}\e[1;32m"
local mesg=$1; shift
printf "${GREEN}==>${ALL_OFF}${BOLD} ${mesg}${ALL_OFF}\n" "$@" >&2
}
post_install() {
msg "Setting up Modem-Scripts"
ln -sfv "/usr/bin/pinephone-modem-setup-common.sh" "/usr/bin/pinephone-modem-setup.sh"
}
post_upgrade() {
post_install
if [[ ! -e "/etc/systemd/system/multi-user.target.wants/eg25-manager.service" ]]; then
msg "Enabling eg25-manager ..."
systemctl enable eg25-manager --now
msg "Disabling pinephone-modem service ..."
systemctl disable pinephone-modem-scripts.pinephone-modem --now
fi
}