mirror of
https://github.com/tailscale-dev/deck-tailscale.git
synced 2025-10-21 15:08:13 +00:00
replace overrides file in favor of sed
This commit is contained in:
@@ -1,2 +1,7 @@
|
||||
[Service]
|
||||
ExtensionDirectories=/var/lib/extensions/tailscale
|
||||
ExecStartPre=
|
||||
ExecStartPre=/opt/tailscale/tailscaled --cleanup
|
||||
ExecStart=
|
||||
ExecStart=/opt/tailscale/tailscaled --state=/var/lib/tailscale/tailscaled.state --socket=/run/tailscale/tailscaled.sock --port=${PORT} $FLAGS
|
||||
ExecStopPost=
|
||||
ExecStopPost=/opt/tailscale/tailscaled --cleanup
|
||||
|
@@ -78,13 +78,15 @@ if ! test -f /etc/default/tailscaled; then
|
||||
cp -rf $tar_dir/systemd/tailscaled.defaults /etc/default/tailscaled
|
||||
fi
|
||||
|
||||
# update paths in the unit file
|
||||
sed -i 's@/usr/sbin/tailscaled@/opt/tailscale/tailscaled@g' /etc/systemd/system/tailscaled.service
|
||||
|
||||
# return to our original directory (silently) and clean up
|
||||
popd > /dev/null
|
||||
rm -rf "${dir}"
|
||||
|
||||
# copy in our overrides file if it doesn't already exist
|
||||
if ! test -f /etc/systemd/system/tailscaled.service.d/override.conf; then
|
||||
mkdir -p /etc/systemd/system/tailscaled.service.d
|
||||
cp -rf override.conf /etc/systemd/system/tailscaled.service.d/override.conf
|
||||
|
||||
echo "done."
|
||||
|
||||
echo -n "Starting required services..."
|
||||
|
Reference in New Issue
Block a user