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
|
# TrustedServers.txt Directory
|
||||||
Environment=FP_DIR=/var/lib/barrier/barrier@%i/barrier/SSL/Fingerprints
|
Environment=FP_DIR=/var/lib/barrier/barrier@%i/barrier/SSL/Fingerprints
|
||||||
# Ensure the Fingerprints directory exists
|
# 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
|
# This uses openssl commands and grep to get the server's key and
|
||||||
# store it in the TrustedServers.txt file. OpenSSL is a requirement
|
# 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
|
Environment=XDG_DATA_HOME=/var/lib/barrier/barrier:24800
|
||||||
# SSL data directory
|
# SSL data directory
|
||||||
Environment=CERT_DIR=/var/lib/barrier/barrier:24800/barrier/SSL
|
Environment=CERT_DIR=/var/lib/barrier/barrier:24800/barrier/SSL
|
||||||
|
# Ensure the SSL directory exists
|
||||||
# Create the certificate directory
|
StateDirectory=barrier/barrier:24800/barrier/SSL
|
||||||
ExecStartPre=+/usr/bin/mkdir -p ${CERT_DIR}
|
|
||||||
# Create the Barrier.pem certificate if it doesn't exist
|
# 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"
|
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
|
Environment=XDG_DATA_HOME=/var/lib/barrier/barrier%i
|
||||||
# SSL data directory
|
# SSL data directory
|
||||||
Environment=CERT_DIR=/var/lib/barrier/barrier%i/barrier/SSL
|
Environment=CERT_DIR=/var/lib/barrier/barrier%i/barrier/SSL
|
||||||
|
# Ensure the SSL directory exists
|
||||||
# Create the certificate directory
|
StateDirectory=barrier/barrier%i/barrier/SSL
|
||||||
ExecStartPre=+/usr/bin/mkdir -p ${CERT_DIR}
|
|
||||||
# Create the Barrier.pem certificate if it doesn't exist
|
# 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"
|
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