Added script to build deb package
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:
@ -1,9 +1,9 @@
|
||||
log_to_file = true
|
||||
log_file = '~/adept/adept.log'
|
||||
log_file = '/var/log/adept/adept.log'
|
||||
log_level = 'info'
|
||||
|
||||
[transcoder]
|
||||
repository = '~/adept'
|
||||
repository = '/srv/adept'
|
||||
interval = 15
|
||||
video_format = 'mov'
|
||||
video_codec = 'dnxhd'
|
||||
|
36
build/scripts/postinst
Executable file
36
build/scripts/postinst
Executable file
@ -0,0 +1,36 @@
|
||||
#!/bin/sh
|
||||
|
||||
GETENT_USER=$(getent passwd adept)
|
||||
# Create the adept user if it doesn't already exist
|
||||
if [ "$GETENT_USER" = "" ]; then
|
||||
echo "Creating the 'adept' user."
|
||||
useradd -r adept
|
||||
else
|
||||
echo "The 'adept' user already exists, skipping creation."
|
||||
fi
|
||||
|
||||
GETENT_GROUP=$(getent group adept)
|
||||
# Create the adept group if it doesn't already exist
|
||||
if [ "$GETENT_GROUP" = "" ]; then
|
||||
echo "Creating the 'adept' group."
|
||||
groupadd adept
|
||||
usermod -aG adept adept
|
||||
else
|
||||
echo "The 'adept' group already exists, skipping creation."
|
||||
fi
|
||||
|
||||
# Change the directory ownership of /etc
|
||||
chown -R adept:adept /etc/adept
|
||||
|
||||
# Create the log directory under /var/log
|
||||
if [ ! -d /var/log/adept ]; then
|
||||
echo "Creating /var/log/adept to store log files."
|
||||
mkdir /var/log/adept
|
||||
chown adept:adept /var/log/adept
|
||||
else
|
||||
echo "/var/log/adept already exists, skipping creation."
|
||||
fi
|
||||
|
||||
#DEBHELPER#
|
||||
|
||||
exit 0
|
Reference in New Issue
Block a user