-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
Because "incron" is not available in Debian 11 anymore this could be an alternative:
apt install inotify-tools
create a file in: /usr/local/bin/clp-install-certificate-watcher
#!/bin/bash
inotifywait -m /etc/nginx/sites-enabled --format %f --exclude '.swp|.swx$' --event create |
while read line1; do
/usr/local/bin/clp-install-certificate ${line1}
systemctl force-reload nginx
done
create a new systemd service in: /etc/systemd/system/clp-install-certificate-watcher.service
[Unit]
Description="Run the custom Cloudpanel certificate watcher"
[Service]
ExecStart=/usr/local/bin/clp-install-certificate-watcher
[Install]
WantedBy=multi-user.target
and make sure it has the right permissions and reload the daemon and start service:
chmod 777 /usr/local/bin/clp-install-certificate-watcher
systemctl daemon-reload
systemctl enable clp-install-certificate-watcher
systemctl start clp-install-certificate-watcher
Metadata
Metadata
Assignees
Labels
No labels