mirror of
https://github.com/cloudpanel-io/cloudpanel-ce.git
synced 2026-04-05 20:31:58 +02:00
Rerun of failed installation adds repeated lines to config files. #159
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @naudefj on 11/28/2024
CloudPanel version(s) affected
2.5.0
Description
File "/var/lib/dpkg/info/cloudpanel.postinst" may write duplicate lines to config files. Note the two lines with ">>" in the function below.
How to reproduce
Re-try failed installation.
Note duplicate entries in /etc/pam.d/common-session and /etc/ssh/sshd_config.
Possible Solution
Check if entries exists before adding it indiscriminately.
For example:
if ! grep -q 'DenyUsers clp' /etc/ssh/sshd_config; then
...
fi
Additional Context
No response