Package ceph-osd: Scripts

Post install

#post_service osd
SYSTEMCTL=systemctl
if sd_booted && "$SYSTEMCTL" --version >/dev/null 2>&1; then
        "$SYSTEMCTL" daemon-reload ||:
        if [ "$1" -eq 1 ]; then
                "$SYSTEMCTL" -q preset ceph-osd@\*.service ceph-disk@\*.service ceph-volume@\*.service ceph-osd.target ||:
        else
                "$SYSTEMCTL" try-restart ceph-osd.target ||:
        fi
else
        /usr/sbin/post_service ceph
fi
Pre uninstall

#preun_service osd
if [ "$1" -eq 0 ]; then
        SYSTEMCTL=systemctl
        if sd_booted && "$SYSTEMCTL" --version >/dev/null 2>&1; then
                "$SYSTEMCTL" --no-reload -q disable ceph-osd@\*.service ceph-disk@\*.service ceph-volume@\*.service ceph-osd.target ||:
                "$SYSTEMCTL" stop ceph-osd@\*.service ceph-disk@\*.service ceph-volume@\*.service ceph-osd.target ||:
        else
                /usr/sbin/preun_service ceph
        fi

fi