#!/bin/bash # analog of %pre/%pretrans RPM scriptlet # For details see: # 1. https://www.debian.org/doc/debian-policy/ch-maintainerscripts.html#summary-of-ways-maintainer-scripts-are-called # 2. https://www.debian.org/doc/debian-policy/ap-flowcharts.html # Arguments in short: # "$1" == "install" # "$1" == "upgrade" # "cloudlinux-linksafe DEBIAN PREINST STARTED" solo_marker='/etc/cloudlinux-edition-solo' container_marker='/etc/cloudlinux-container' if [ -f "$solo_marker" ] || [ -f "$container_marker" ]; then exit 0 fi if [[ "$1" == "install" ]]; then if ! getent group linksafe >/dev/null; then groupadd -r linksafe fi fi # "cloudlinux-linksafe DEBIAN PREINST FINISHED" exit 0