picloud deploy
This commit is contained in:
25
utils/cloud_dispatcher/debian-service/DEBIAN/preinst
Normal file
25
utils/cloud_dispatcher/debian-service/DEBIAN/preinst
Normal file
@@ -0,0 +1,25 @@
|
||||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
action=$1
|
||||
version=$2
|
||||
|
||||
if [ "$action" = "install" ]; then
|
||||
gr=dialout
|
||||
if grep -q gpio /etc/group; then
|
||||
gr=$gr,gpio
|
||||
fi
|
||||
useradd --system --create-home --home-dir /var/lib/shs --shell /usr/sbin/nologin --groups $gr shs
|
||||
fi
|
||||
#if [ "$action" = upgrade ] || [ "$action" = install ]
|
||||
#then
|
||||
# if dpkg --compare-versions "$version" lt 1:5.5p1-6 && \
|
||||
# [ -d /run/sshd ]; then
|
||||
# # make sure /run/sshd is not removed on upgrades
|
||||
# touch /run/sshd/.placeholder
|
||||
# fi
|
||||
#fi
|
||||
|
||||
#dpkg-maintscript-helper rm_conffile /etc/network/if-up.d/openssh-server 1:7.9p1-1~ -- "$@"
|
||||
|
||||
exit 0
|
||||
Reference in New Issue
Block a user