Merge pull request #502 from qitechgmbh/fix-caps
Set caps also for real time
This commit is contained in:
1 file changed
+9
-7
+9
-7
@@ -3,21 +3,23 @@
|
||||
FEATURE=""
|
||||
|
||||
# Check if "mock-machine" was passed as an argument
|
||||
if [ "$1" == "mock-machine" ]; then
|
||||
if [[ "$1" == "mock-machine" ]]; then
|
||||
echo "Building Debug Code with mock-machine feature"
|
||||
FEATURE="--features mock-machine"
|
||||
fi
|
||||
if [[ "$1" == "release" ]]; then
|
||||
echo "building Release Code"
|
||||
cargo build --release
|
||||
else
|
||||
echo "Building Debug Code"
|
||||
cargo build $FEATURE
|
||||
fi
|
||||
|
||||
# Build the project with or without features
|
||||
cargo build $FEATURE
|
||||
|
||||
# Only setcap if not building with mock-machine
|
||||
if [ "$1" != "mock-machine" ]; then
|
||||
echo "Setting capabilities for server executable"
|
||||
sudo setcap cap_net_raw=eip ./target/debug/server
|
||||
sudo setcap 'cap_net_raw,cap_sys_nice=eip' ./target/debug/server
|
||||
fi
|
||||
|
||||
# Run the server
|
||||
# run
|
||||
./target/debug/server
|
||||
|
||||
Reference in new issue
Block a user