#!/bin/sh
echo "Stopping xcauth.service, if running"
systemctl -q stop xcauth.service
echo "(Re-)starting listening sockets"
cd /etc/systemd/system && for i in xc*.socket; do
	systemctl start $i
done

#!/bin/sh
echo "Fixing permissions (just in case)"
chown -R xcauth:xcauth /etc/xcauth.conf /var/*/xcauth
echo "Stopping xcauth.service, if running"
systemctl -q stop xcauth.service
echo "(Re-)starting listening sockets"
cd /etc/systemd/system && for i in xc*.socket; do
	systemctl start $i
done

Fix permissions as part of restart
Fix permissions as part of restart

This is one of the most common mistakes:

- The first `xcauth` run is as root, creating the files as root
- Following daemon runs as user "xcauth" cannot access DB and
  log files

This avoids this problem.
