1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
groupadd -r -f vitastor 2>/dev/null ||: useradd -r -g vitastor -s /sbin/nologin -c "Vitastor daemons" -M -d /var/lib/vitastor vitastor 2>/dev/null ||: #%post mon #/usr/sbin/post_service vitastor-mon #%preun mon #/usr/sbin/preun_service vitastor-mon #%post osd #systemctl daemon-reload ||: #if [ "$1" -eq 1 ]; then # systemctl -q preset vitastor-osd@\*.service vitastor-osd.target ||: #else # systemctl try-restart vitastor-osd.target ||: #fi #%preun osd #if [ "$1" -eq 0 ]; then # systemctl --no-reload -q disable vitastor-osd@\*.service vitastor-osd.target ||: # systemctl stop vitastor-osd@\*.service vitastor-osd.target ||: #fi