Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
Paranoid-Dev authored Sep 29, 2021
1 parent 7505a45 commit ed57304
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 0 deletions.
10 changes: 10 additions & 0 deletions root/etc/systemd/system/user-startup-sh.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[Unit]
Description=starts up user placed scripts in /etc/user_startup_scripts.d/

[Service]
Type=oneshot
ExecStart=/etc/user_startup_scripts.d/user_startup_scripts

[Install]
WantedBy=multi-user.target

1 change: 1 addition & 0 deletions root/etc/user_startup_scripts.d/README
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Place .sh here to be run at startup
4 changes: 4 additions & 0 deletions root/etc/user_startup_scripts.d/hdd_sleep.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/bash
hdparm -S 60 /dev/sdb
hdparm -S 60 /dev/sdc

5 changes: 5 additions & 0 deletions root/etc/user_startup_scripts.d/user_startup_scripts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash

for f in /etc/user_startup_scripts.d/*.sh; do
"$f"
done
11 changes: 11 additions & 0 deletions root/etc/user_startup_scripts.d/zram.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/bash
echo 0 > /sys/module/zswap/parameters/enabled
modprobe zram num_devices=2
echo lz4hc > /sys/block/zram0/comp_algorithm
echo zstd > /sys/block/zram1/comp_algorithm
echo 2G > /sys/block/zram0/disksize
echo 10G > /sys/block/zram1/disksize
mkswap /dev/zram0
mkswap /dev/zram1
swapon /dev/zram0 -p 32767
swapon /dev/zram1 -p 32766

0 comments on commit ed57304

Please sign in to comment.