diff options
author | Severin Glöckner | 2021-02-26 03:22:30 +0100 |
---|---|---|
committer | Severin Glöckner | 2021-02-26 03:26:09 +0100 |
commit | 18b7b51f1e7cf771562643eaec1ce4a7edf45f3e (patch) | |
tree | 61b0f0a3f1bc4503b921cde442788218e72c6bd2 | |
download | aur-18b7b51f1e7cf771562643eaec1ce4a7edf45f3e.tar.gz |
initial commit
-rw-r--r-- | .SRCINFO | 29 | ||||
-rw-r--r-- | PKGBUILD | 39 | ||||
-rw-r--r-- | sshd-launcher.install | 20 | ||||
-rw-r--r-- | sshd.desktop | 30 | ||||
-rw-r--r-- | sshd.sudoers | 11 |
5 files changed, 129 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..c02daa0c0f76 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,29 @@ +pkgbase = sshd-launcher + pkgdesc = sudoers & desktop file to launch sshd on demand + pkgver = 1 + pkgrel = 1 + install = sshd-launcher.install + arch = any + license = GPL + depends = sudo + depends = openssh + depends = systemd + source = sshd.sudoers + source = sshd.desktop + source = icon-16.svg::https://raw.githubusercontent.com/Fatih20/easyssh/icon-redesign/data/icons/16/com.github.muriloventuroso.easyssh.svg + source = icon-24.svg::https://raw.githubusercontent.com/Fatih20/easyssh/icon-redesign/data/icons/24/com.github.muriloventuroso.easyssh.svg + source = icon-32.svg::https://raw.githubusercontent.com/Fatih20/easyssh/icon-redesign/data/icons/32/com.github.muriloventuroso.easyssh.svg + source = icon-48.svg::https://raw.githubusercontent.com/Fatih20/easyssh/icon-redesign/data/icons/48/com.github.muriloventuroso.easyssh.svg + source = icon-64.svg::https://raw.githubusercontent.com/Fatih20/easyssh/icon-redesign/data/icons/64/com.github.muriloventuroso.easyssh.svg + source = icon-128.svg::https://raw.githubusercontent.com/Fatih20/easyssh/icon-redesign/data/icons/128/com.github.muriloventuroso.easyssh.svg + sha256sums = 53b7556e84182119ba1a549b3dc5bb10e943e862afbc7947bc8f12cf8ee4152a + sha256sums = 90d25814121bc7c0902612a40046ae7013a06cf44c6e10b643fa66e33cbb111d + sha256sums = b76a6c3f9e54a339e549aa99adffb9ecf033bb9b53b29397c4ee4be4c2634808 + sha256sums = b70c81698b988f31d68eeeb3b5b84c8ea0ea71df38976dabd358fc5dd6538642 + sha256sums = f6357aae89abae45453aa0e86326d9e98b485b27f9366a326193152b0139d706 + sha256sums = 49a34642d55efecbc44587aaa430abb6aa4d1f3985ab3a07296a6af3ece383eb + sha256sums = 11f6f56090d1efe41bc46e3ebfa1dc5c67e7903d873ea2e737ae6bbca7b9ad2b + sha256sums = c55b5869b2cb949587229ab3ccef190bc543124de7e333741612eb47c74960aa + +pkgname = sshd-launcher + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..0efad3db541c --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,39 @@ +# Maintainer: Severin Glöckner <severin.gloeckner@stud.htwk-leipzig.de> + +pkgname=sshd-launcher +pkgver=1 +pkgrel=1 +pkgdesc="sudoers & desktop file to launch sshd on demand" +arch=('any') +# url=None +license=('GPL') +depends=('sudo' 'openssh' 'systemd') +install=${pkgname}.install +source=('sshd.sudoers' 'sshd.desktop') +# Icons orignally proposed for github.com/muriloventuroso/easyssh +for size in 16 24 32 48 64 128 +do + source+=(icon-${size}.svg::https://raw.githubusercontent.com/Fatih20/easyssh/icon-redesign/data/icons/${size}/com.github.muriloventuroso.easyssh.svg) + +done +sha256sums=('53b7556e84182119ba1a549b3dc5bb10e943e862afbc7947bc8f12cf8ee4152a' + '90d25814121bc7c0902612a40046ae7013a06cf44c6e10b643fa66e33cbb111d' + 'b76a6c3f9e54a339e549aa99adffb9ecf033bb9b53b29397c4ee4be4c2634808' + 'b70c81698b988f31d68eeeb3b5b84c8ea0ea71df38976dabd358fc5dd6538642' + 'f6357aae89abae45453aa0e86326d9e98b485b27f9366a326193152b0139d706' + '49a34642d55efecbc44587aaa430abb6aa4d1f3985ab3a07296a6af3ece383eb' + '11f6f56090d1efe41bc46e3ebfa1dc5c67e7903d873ea2e737ae6bbca7b9ad2b' + 'c55b5869b2cb949587229ab3ccef190bc543124de7e333741612eb47c74960aa') + +package() { + cd "${srcdir}" + + install -dm750 "${pkgdir}"/etc/sudoers.d + install -Dm440 sshd.sudoers "${pkgdir}"/etc/sudoers.d/90-sshd + install -Dm644 sshd.desktop "${pkgdir}"/usr/share/applications/sshd.desktop + + for size in 16 24 32 48 64 128 + do + install -Dm644 icon-${size}.svg "${pkgdir}"/usr/share/icons/hicolor/${size}x${size}/apps/${pkgname}.svg + done +} diff --git a/sshd-launcher.install b/sshd-launcher.install new file mode 100644 index 000000000000..de77d0d2e8f1 --- /dev/null +++ b/sshd-launcher.install @@ -0,0 +1,20 @@ +#!/hint/bash + +post_install() { + echo "You can launch & stop the SSH-Daemon via the desktop entry." + echo "Permission is checked through group membership in the sys group." + echo "You can add yourself with:" + echo "gpasswd -a YOURNAME sys" + echo "" + post_upgrade +} + +post_upgrade() { + if systemctl is-enabled sshd.service --quiet + then + echo "The sshd service is currently enabled and thus started at boot." + echo "The purpose of this package is to start it on demand, consider disabling it with:" + echo "systemctl disable sshd" + echo "" + fi +} diff --git a/sshd.desktop b/sshd.desktop new file mode 100644 index 000000000000..266743399de6 --- /dev/null +++ b/sshd.desktop @@ -0,0 +1,30 @@ +[Desktop Entry] +Version=1.0 +Type=Application +Name=SSH-Daemon +Name[de]=SSH-Dämon +GenericName=Allow Remote Shell Access +GenericName[de]=Fernzugriff per Terminal gestatten +Comment=Allow others to access your computer via a terminal +Comment[de]=Anderen Fernzugriff in Form eines Terminal gestatten +Icon=sshd-launcher +Exec=/usr/bin/sudo /usr/bin/systemctl start sshd.service +StartupNotify=false +Terminal=false +Categories=System; +Actions=Stop;Restart;Reload + +[Desktop Action Stop] +Name=Stop SSH-Daemon +Name[de]=SSH-Dämon beenden +Exec=/usr/bin/sudo /usr/bin/systemctl stop sshd.service + +[Desktop Action Restart] +Name=Restart SSH-Daemon +Name[de]=SSH-Dämon neu starten +Exec=/usr/bin/sudo /usr/bin/systemctl restart sshd.service + +[Desktop Action Reload] +Name=Reload SSH-Daemon +Name[de]=Konfiguration neu einlesen +Exec=/usr/bin/sudo /usr/bin/systemctl reload sshd.service diff --git a/sshd.sudoers b/sshd.sudoers new file mode 100644 index 000000000000..3779fb2d387e --- /dev/null +++ b/sshd.sudoers @@ -0,0 +1,11 @@ +# allow starting SSHD on demand (instead of letting it run all the time) +%sys ALL=(root) NOPASSWD: /usr/bin/systemctl start sshd +%sys ALL=(root) NOPASSWD: /usr/bin/systemctl start sshd.service +%sys ALL=(root) NOPASSWD: /usr/bin/systemctl stop sshd +%sys ALL=(root) NOPASSWD: /usr/bin/systemctl stop sshd.service +%sys ALL=(root) NOPASSWD: /usr/bin/systemctl restart sshd +%sys ALL=(root) NOPASSWD: /usr/bin/systemctl restart sshd.service +%sys ALL=(root) NOPASSWD: /usr/bin/systemctl reload sshd +%sys ALL=(root) NOPASSWD: /usr/bin/systemctl reload sshd.service +%sys ALL=(root) NOPASSWD: /usr/bin/systemctl reload-or-restart sshd +%sys ALL=(root) NOPASSWD: /usr/bin/systemctl reload-or-restart sshd.service |