diff -Nur --no-dereference smeserver-fetchmail-1.6.old/createlinks smeserver-fetchmail-1.6/createlinks --- smeserver-fetchmail-1.6.old/createlinks 2022-07-28 10:33:25.211000000 -0400 +++ smeserver-fetchmail-1.6/createlinks 2022-07-28 11:10:53.157000000 -0400 @@ -12,8 +12,9 @@ templates2events( $file, $event ); } #action needed in case we have a systemd unit -event_link('systemd-default', $event, '10'); -event_link('systemd-reload', $event, '50'); +event_link('systemd-default', $event, '88'); +event_link('systemd-reload', $event, '89'); +event_link('fetchmail-migrate-fetchids', $event, '91'); #action specific to this package #event_link('action', $event, '30'); #services we need to restart diff -Nur --no-dereference smeserver-fetchmail-1.6.old/root/etc/e-smith/events/actions/fetchmail-migrate-fetchids smeserver-fetchmail-1.6/root/etc/e-smith/events/actions/fetchmail-migrate-fetchids --- smeserver-fetchmail-1.6.old/root/etc/e-smith/events/actions/fetchmail-migrate-fetchids 1969-12-31 19:00:00.000000000 -0500 +++ smeserver-fetchmail-1.6/root/etc/e-smith/events/actions/fetchmail-migrate-fetchids 2022-07-28 11:06:55.577000000 -0400 @@ -0,0 +1,15 @@ +#!/usr/bin/perl + +use File::Copy; + +my $original_file = "/run/lock/fetchmail/.fetchids"; +my $new_file = "/var/lib/fetchmail/.fetchids"; +my $status=`/usr/bin/systemctl is-active fetchmail.service`; + +exit 0 if ( -f $new_file ) ; +exit 0 unless ( -f $original_file ) ; + +system("/usr/bin/systemctl stop fetchmail.service") if ( $status eq "active"); +#move($original_file, $new_file) or warn "The move operation failed: $!"; +system("/usr/bin/mv $original_file $new_file") == 0 or warn "The move operation failed: $!"; +system("/usr/bin/systemctl start fetchmail.service") if ( $status eq "active");