use StateDirectory instead of mkdir
This commit is contained in:
parent
368f0d7f7a
commit
35ac344a36
|
@ -37,7 +37,7 @@ Environment=XDG_DATA_HOME=/var/lib/barrier/barrier@%i
|
|||
# TrustedServers.txt Directory
|
||||
Environment=FP_DIR=/var/lib/barrier/barrier@%i/barrier/SSL/Fingerprints
|
||||
# Ensure the Fingerprints directory exists
|
||||
ExecStartPre=+/usr/bin/mkdir -p "${FP_DIR}"
|
||||
StateDirectory=barrier/barrier@%i/barrier/SSL/Fingerprints
|
||||
|
||||
# This uses openssl commands and grep to get the server's key and
|
||||
# store it in the TrustedServers.txt file. OpenSSL is a requirement
|
||||
|
|
|
@ -26,9 +26,8 @@ Environment=DISPLAY=:0
|
|||
Environment=XDG_DATA_HOME=/var/lib/barrier/barrier:24800
|
||||
# SSL data directory
|
||||
Environment=CERT_DIR=/var/lib/barrier/barrier:24800/barrier/SSL
|
||||
|
||||
# Create the certificate directory
|
||||
ExecStartPre=+/usr/bin/mkdir -p ${CERT_DIR}
|
||||
# Ensure the SSL directory exists
|
||||
StateDirectory=barrier/barrier:24800/barrier/SSL
|
||||
# Create the Barrier.pem certificate if it doesn't exist
|
||||
ExecStartPre=/usr/bin/sh -c "[ -f ${CERT_DIR}/Barrier.pem ] || openssl req -x509 -nodes -days 365 -subj '/CN=Barrier' -newkey rsa:2048 -text -keyout ${CERT_DIR}/Barrier.pem -out ${CERT_DIR}/Barrier.pem"
|
||||
|
||||
|
|
|
@ -38,9 +38,8 @@ Environment=DISPLAY=:0
|
|||
Environment=XDG_DATA_HOME=/var/lib/barrier/barrier%i
|
||||
# SSL data directory
|
||||
Environment=CERT_DIR=/var/lib/barrier/barrier%i/barrier/SSL
|
||||
|
||||
# Create the certificate directory
|
||||
ExecStartPre=+/usr/bin/mkdir -p ${CERT_DIR}
|
||||
# Ensure the SSL directory exists
|
||||
StateDirectory=barrier/barrier%i/barrier/SSL
|
||||
# Create the Barrier.pem certificate if it doesn't exist
|
||||
ExecStartPre=/usr/bin/sh -c "[ -f ${CERT_DIR}/Barrier.pem ] || openssl req -x509 -nodes -days 365 -subj '/CN=Barrier' -newkey rsa:2048 -text -keyout ${CERT_DIR}/Barrier.pem -out ${CERT_DIR}/Barrier.pem"
|
||||
|
||||
|
|
Loading…
Reference in New Issue