Package systemd-journal-remote: Scripts

Post install

 
if sd_booted; then 
    systemctl daemon-reload 
    if [ $1 -eq 1 ]; then 
        # Initial installation 
        systemctl --no-reload preset systemd-journal-gatewayd.service systemd-journal-remote.service || : 
    else 
        # Package upgrade, not uninstall 
        /lib/systemd/systemd-update-helper mark-restart-system-units systemd-journal-gatewayd.service systemd-journal-remote.service || : 
    fi 
fi 


 
if sd_booted; then 
    systemctl daemon-reload 
    if [ $1 -eq 1 ]; then 
        # Initial installation 
        systemctl --no-reload preset systemd-journal-upload.service || : 
    else 
        # Package upgrade, not uninstall 
        /lib/systemd/systemd-update-helper mark-restart-system-units systemd-journal-upload.service || : 
    fi 
fi
Pre install

1
2
3
groupadd -r -f systemd-journal-remote ||:
useradd -g systemd-journal-remote -c 'Journal Remote' \
    -d /var/log/journal/remote -s /dev/null -r -l systemd-journal-remote >/dev/null 2>&1 ||:
Pre uninstall

 
if [ $1 -eq 0 ] && sd_booted; then 
    # Package removal, not upgrade 
    /lib/systemd/systemd-update-helper remove-system-units systemd-journal-gatewayd.service systemd-journal-remote.service systemd-journal-gatewayd.socket systemd-journal-remote.socket || : 
fi 


 
if [ $1 -eq 0 ] && sd_booted; then 
    # Package removal, not upgrade 
    /lib/systemd/systemd-update-helper remove-system-units systemd-journal-upload.service || : 
fi 


if [ $1 -eq 1 ] ; then
    if [ -f /var/lib/systemd/journal-upload/state -a ! -L /var/lib/systemd/journal-upload ] ; then
        mkdir -p /var/lib/private/systemd/journal-upload
        mv /var/lib/systemd/journal-upload/state /var/lib/private/systemd/journal-upload/
        rmdir /var/lib/systemd/journal-upload || :
     fi
fi