@@ -127,7 +127,7 @@ fn main() -> anyhow::Result<()> {
127127 service. add_profile_fragment ( & mode) ?;
128128 if !no_restart {
129129 service. reload_unit_config ( ) ?;
130- service. action ( "restart" ) ?;
130+ service. action ( "restart" , false ) ?;
131131 } else {
132132 log:: warn!( "Profiling config will only be applied when systemd config is reloaded, and service restarted" ) ;
133133 }
@@ -138,7 +138,7 @@ fn main() -> anyhow::Result<()> {
138138 no_restart,
139139 } ) => {
140140 let service = systemd:: Service :: new ( & service) ;
141- service. action ( "stop" ) ?;
141+ service. action ( "stop" , true ) ?;
142142 service. remove_profile_fragment ( ) ?;
143143 let resolved_opts = service. profiling_result ( ) ?;
144144 log:: info!(
@@ -154,15 +154,15 @@ fn main() -> anyhow::Result<()> {
154154 }
155155 service. reload_unit_config ( ) ?;
156156 if !no_restart {
157- service. action ( "start" ) ?;
157+ service. action ( "start" , false ) ?;
158158 }
159159 }
160160 cl:: Action :: Service ( cl:: ServiceAction :: Reset { service } ) => {
161161 let service = systemd:: Service :: new ( & service) ;
162162 let _ = service. remove_profile_fragment ( ) ;
163163 let _ = service. remove_hardening_fragment ( ) ;
164164 service. reload_unit_config ( ) ?;
165- service. action ( "try-restart" ) ?;
165+ service. action ( "try-restart" , false ) ?;
166166 }
167167 }
168168
0 commit comments