Polarion二次开发的插件中,对Servlet新增、修改或删除时,发布到应用需要删除.config文件才能使修改生效,每次需要手动执行,不如加到restart启动脚本中。只需修改start函数即可。
代码如下:
vi /opt/polarion/bin/polarion.init
start() {
check_start
echo;
echo "Starting Polarion service..."
echo "Please wait for background operation to finish! For more information see:";
echo "tail -100f $logFile OR $0 log";
echo;
echo 'Launching the Polarion Server. This can take some time; please be patient...'
echo "Delete .config directory..."
rm -rf /opt/polarion/data/workspace/.config
echo "Delete .config directory done"
if check_systemd && check_polarionUnitFile; then
systemctl start polarion
else
startPolarion
fi
if check_pid_f
then
echo -e "\nRunning Polarion service..."
# (exec -a "Log waiting" tail -100f $logFile ) &
fi
}