Updated the Makefile to add commands for installing and uninstalling the software on Linux - this will make up for not having native packaging for the time being
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
This commit is contained in:
parent
e915ebdf34
commit
a8a46df87f
20
Makefile
20
Makefile
@ -11,6 +11,26 @@ test:
|
||||
run:
|
||||
go build -o ${BINARY_NAME} adept.go
|
||||
./${BINARY_NAME}
|
||||
|
||||
install:
|
||||
useradd ${BINARY_NAME}
|
||||
usermod -aG ${BINARY_NAME} ${BINARY_NAME}
|
||||
cp ./${BINARY_NAME} /usr/bin/${BINARY_NAME}
|
||||
chown root:root /usr/bin/${BINARY_NAME}
|
||||
chmod 755 /usr/bin/${BINARY_NAME}
|
||||
cp ./build/etc/systemd/system/${BINARY_NAME}.service /etc/systemd/system/${BINARY_NAME}.service
|
||||
chown root:root /etc/systemd/system/${BINARY_NAME}.service
|
||||
chmod 644 /etc/systemd/system/${BINARY_NAME}.service
|
||||
mkdir /etc/${BINARY_NAME}
|
||||
cp ./build/etc/${BINARY_NAME}/${BINARY_NAME}.toml /etc/${BINARY_NAME}/
|
||||
chown -R ${BINARY_NAME}:${BINARY_NAME} /etc/${BINARY_NAME}
|
||||
chmod 644 /etc/${BINARY_NAME}/${BINARY_NAME}.toml
|
||||
|
||||
uninstall:
|
||||
userdel ${BINARY_NAME}
|
||||
rm /usr/bin/${BINARY_NAME}
|
||||
rm /etc/systemd/system/${BINARY_NAME}.service
|
||||
rm -rf /etc/${BINARY_NAME}
|
||||
|
||||
clean:
|
||||
go clean
|
||||
|
11
build/etc/systemd/system/adept.service
Normal file
11
build/etc/systemd/system/adept.service
Normal file
@ -0,0 +1,11 @@
|
||||
[Unit]
|
||||
Description=Adept video transcoder service
|
||||
|
||||
[Service]
|
||||
User=adept
|
||||
Group=adept
|
||||
ExecStart=/usr/bin/adept
|
||||
SuccessExitStatus=143
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
Loading…
Reference in New Issue
Block a user