Skip to content

Commit

Permalink
system/k3s: Test CI
Browse files Browse the repository at this point in the history
Signed-off-by: Pouria Rezaei <[email protected]>
  • Loading branch information
RSKYS committed Jun 26, 2024
1 parent e6fe7fe commit 6b38a28
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 23 deletions.
7 changes: 1 addition & 6 deletions system/k3s/doinst.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,5 @@ config() {
config etc/rancher/k3s/k3s.service.env.new

if [ -x /etc/rc.d/rc.k3s ]; then
if [ ! -f /etc/rancher/k3s/k3s.yaml ]; then
k3s server \
--write-kubeconfig /etc/rancher/k3s/k3s.yaml \
--write-kubeconfig-mode 644 > /dev/null 2>&1 &
fi
/etc/rc.d/rc.k3s restart > /dev/null
/etc/rc.d/rc.k3s restart > /dev/null
fi
19 changes: 2 additions & 17 deletions system/k3s/k3s.SlackBuild
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ cd $(dirname $0) ; CWD=$(pwd)

PRGNAM=k3s
VERSION=${VERSION:-1.30.0}
BUILD=${BUILD:-2}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}

Expand Down Expand Up @@ -60,22 +60,6 @@ else
exit 1
fi

bailout() {
echo " Better to have a k3s group to run this script. "
echo " create k3s group and add user to avoid always use of sudo: "
echo " # groupadd k3s "
echo " # chown root:k3s /etc/rancher/k3s/k3s.yaml "
echo " # chmod 740 /etc/rancher/k3s/k3s.yaml "
echo " # usermod -aG k3s \$USER (Replace \$USER with your username) "
echo " Then restart k3s daemon. "
exit 1
}

# Bail if group isn't valid on your system.
if ! grep -q "^$PRGNAM:" /etc/group; then
bailout
fi

rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
Expand Down Expand Up @@ -104,6 +88,7 @@ for symlink in kubectl crictl ctr; do
ln -sf /usr/bin/k3s usr/bin/$symlink
done

rm -rf usr/share/doc
mkdir -p usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild

Expand Down

0 comments on commit 6b38a28

Please sign in to comment.