This commit is contained in:
Iwan Clément
2019-05-16 14:36:46 +02:00
2 changed files with 6 additions and 4 deletions

View File

@@ -38,9 +38,11 @@ mkdir /home/$USERNAME/.ssh \
&& chown -R $USERNAME:$USERNAME /home/$USERNAME \
|| exit 3
if [ -d /var/lib/AccountsService/users ]; then
echo "[User]">/var/lib/AccountsService/users/$USERNAME
echo "SystemAccount=true">>/var/lib/AccountsService/users/$USERNAME
if [ -e $DEBFLAG ]; then
if [ -d /var/lib/AccountsService/users ]; then
echo "[User]">/var/lib/AccountsService/users/$USERNAME
echo "SystemAccount=true">>/var/lib/AccountsService/users/$USERNAME
fi
fi
if [ -e $DEBFLAG ]; then

View File

@@ -5,7 +5,7 @@ After=network.target
[Service]
User={{ANS_REMOTE_USER}}
ExecStartPre=cd /home/{{ANS_REMOTE_USER}}
#ExecStartPre=cd /home/{{ANS_REMOTE_USER}}
EnvironmentFile=/etc/default/secure-tunnel
ExecStart=/usr/bin/ssh -p ${REMOTE_PORT} -NT -i /home/{{ANS_REMOTE_USER}}/.ssh/{{KEY_NAME}} -o StrictHostKeyChecking=no -o ServerAliveInterval=60 -o ExitOnForwardFailure=yes -R ${RTARGET_PORT}:localhost:22 ${ANS_TARGET_USER}@${TARGET}