enable-policy.sh raw
1 #!/bin/bash
2 # Enable ORLY policy system
3
4 set -e
5
6 echo "Enabling ORLY policy system..."
7
8 # Backup the current service file
9 sudo cp /etc/systemd/system/orly.service /etc/systemd/system/orly.service.backup
10
11 # Add ORLY_POLICY_ENABLED=true to the service file
12 sudo sed -i '/SyslogIdentifier=orly/a\\n# Policy system\nEnvironment="ORLY_POLICY_ENABLED=true"' /etc/systemd/system/orly.service
13
14 # Reload systemd
15 sudo systemctl daemon-reload
16
17 echo "✓ Policy system enabled in systemd service"
18 echo "✓ Daemon reloaded"
19 echo ""
20 echo "Next steps:"
21 echo "1. Restart the relay: sudo systemctl restart orly"
22 echo "2. Verify policy is active: journalctl -u orly -f | grep policy"
23 echo ""
24 echo "Your policy configuration (~/.config/ORLY/policy.json):"
25 cat ~/.config/ORLY/policy.json
26