Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add openSUSE support #162

Merged
merged 3 commits into from
Jun 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions .configs/opensuse-torrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
DataDirectory /var/lib/tor
PidFile /var/run/tor/tor.pid
RunAsDaemon 1
User tor

ControlSocket /var/run/tor/control
ControlSocketsGroupWritable 1

CookieAuthentication 1
CookieAuthFileGroupReadable 1
CookieAuthFile /var/run/tor/control.authcookie

Log notice file /var/log/tor/log

ClientOnly 1
TransPort 9051
DNSPort 9061

VirtualAddrNetwork 10.66.0.0/255.255.0.0
AutomapHostsOnResolve 1
7 changes: 6 additions & 1 deletion lib/Nipe/Utils/Device.pm
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,13 @@ package Nipe::Utils::Device {
$device{distribution} = "void";
}

elsif (($id_like =~ /[S,s]use/) || ($id_distro =~ /[O,o]pen[S,s]use/)) {
$device{username} = "tor";
$device{distribution} = "opensuse";
}

return %device;
}
}

1;
1;
5 changes: 3 additions & 2 deletions lib/Nipe/Utils/Install.pm
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ package Nipe::Utils::Install {
"fedora" => "dnf install -y tor iptables",
"centos" => "yum -y install epel-release tor iptables",
"void" => "xbps-install -y tor iptables",
"arch" => "pacman -S --noconfirm tor iptables"
"arch" => "pacman -S --noconfirm tor iptables",
"opensuse" => "zypper install -y tor iptables"
);

if ($device{distribution} eq "void") {
Expand All @@ -29,4 +30,4 @@ package Nipe::Utils::Install {
}
}

1;
1;
Loading