You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
505 B
20 lines
505 B
[Unit]
|
|
Description=Named network namespace %i
|
|
JoinsNamespaceOf=systemd-netns@%i.service
|
|
After=syslog.target network.target tor.service
|
|
|
|
[Service]
|
|
Type=oneshot
|
|
RemainAfterExit=true
|
|
PrivateNetwork=true
|
|
|
|
# Start process
|
|
ExecStartPre=-/usr/bin/ip netns delete %I
|
|
ExecStart=/usr/bin/ip netns add %I
|
|
ExecStart=/usr/bin/ip netns exec %I ip link set lo up
|
|
ExecStart=/usr/bin/umount /run/netns/%I
|
|
ExecStart=/usr/bin/mount --bind /proc/self/ns/net /run/netns/%I
|
|
|
|
# Stop process
|
|
ExecStop=/usr/bin/ip netns delete %I
|