Closed deniscostadsc closed 7 years ago
Please consider that ppl use the pixelated-user-agent
debian package standalone on their laptop/vagrant box in activist mode without having pixelated-server installed.
So pixelated-server
should only get restarted when it's actually installed.
@varac , @deniscostadsc , @thaissiqueira , I added a commit for only restarting the pixelated-server if it's active. What do you think?
We can remove the if, if we assume it'll always run on debian and our users will be using it.
Please consider that ppl use the pixelated-user-agent debian package standalone on their laptop/vagrant box in activist mode without having pixelated-server installed. So pixelated-server should only get restarted when it's actually installed.
We are considering this. The if
@anikarni inserted, solves the cases when systemd is not used and the logic is inside the if just stop pixelated-server if it is installed, up and running.
We tested the upgrade with if
suggested by @anikarni and it doesn't broke.
So we are merging this change and for the next issue we should consider restart pixelated-user-agent on single user mode.
After upgrading Pixelated User Agent package this script will restart the server in order to have the newest code running.
This change makes explicit the relationship between pixelated-user-agent and pixelated-server. It is not necessarily good, so we are planning to unify pixelated-service and pixelated-user-agent on the feature to make pixelated-user-agent as a service. For now it will solve our current problem about restart pixelated-service after the pixelated-user-agent updated package.