refactor some method which are related with systemd unit Signed-off-by: ComixHe <heyuming@deepin.org>