| 1 |
#!/bin/sh |
| 2 |
|
| 3 |
set -e |
| 4 |
|
| 5 |
ROOT_PASSWORD_STATUS=$(passwd --status root | cut -f 2 -d' ') |
| 6 |
if [ ${ROOT_PASSWORD_STATUS} = "L" ]; then |
| 7 |
IS_ROOT_ENABLED=0 |
| 8 |
fi |
| 9 |
|
| 10 |
case "$1" in |
| 11 |
configure|upgrade|now|abort-upgrade|abort-remove|abort-deconfigure) |
| 12 |
# Disable the service if the root user is not enabled |
| 13 |
if [ ${IS_ROOT_ENABLED} -eq 0 ]; then |
| 14 |
deb-systemd-helper disable gpu-screen-recorder.service |
| 15 |
echo "The root user is not enabled, so gpu-screen-recorder.service can not be enablded." |
| 16 |
fi |
| 17 |
;; |
| 18 |
|
| 19 |
*) |
| 20 |
echo "postinst called with unknown argument \`$1'" >&2 |
| 21 |
;; |
| 22 |
esac |
| 23 |
|
| 24 |
#DEBHELPER# |
| 25 |
|
| 26 |
exit 0 |