mirror of
https://github.com/kidwellj/proxmox-scripts.git
synced 2025-01-09 13:12:22 +00:00
Updated snowflake-install.sh
This commit is contained in:
parent
e18a2aeb59
commit
2a9e3dc7f1
|
@ -76,12 +76,32 @@ msg_ok "Installed Dependencies"
|
||||||
msg_info "Install Snowflake"
|
msg_info "Install Snowflake"
|
||||||
useradd -rm snowflake
|
useradd -rm snowflake
|
||||||
su snowflake -c "cd /home/snowflake && git clone https://git.torproject.org/pluggable-transports/snowflake.git && cd /home/snowflake/snowflake/proxy && go build"
|
su snowflake -c "cd /home/snowflake && git clone https://git.torproject.org/pluggable-transports/snowflake.git && cd /home/snowflake/snowflake/proxy && go build"
|
||||||
wget https://raw.githubusercontent.com/StevenSeifried/proxmox-scripts/main/systemd_files/snowflake.service -O /etc/systemd/system/snowflake.service
|
|
||||||
chmod 644 /etc/systemd/system/snowflake.service
|
|
||||||
systemctl daemon-reload
|
|
||||||
systemctl enable --now snowflake.service
|
|
||||||
msg_ok "Installed Snowflake"
|
msg_ok "Installed Snowflake"
|
||||||
|
|
||||||
|
msg_info "Creating Service"
|
||||||
|
cat << 'EOF' > /etc/systemd/system/snowflake.service
|
||||||
|
[Unit]
|
||||||
|
Description=Snowflake
|
||||||
|
Wants=network.target
|
||||||
|
After=syslog.target network-online.target
|
||||||
|
StartLimitIntervalSec=300
|
||||||
|
StartLimitBurst=10
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=simple
|
||||||
|
ExecStart=/home/snowflake/snowflake/proxy/proxy -log /home/snowflake/snowflake.log
|
||||||
|
Restart=on-failure
|
||||||
|
RestartSec=5
|
||||||
|
KillMode=process
|
||||||
|
User=snowflake
|
||||||
|
Group=snowflake
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
||||||
|
EOF
|
||||||
|
ln -s /usr/share/jellyfin/web/ /usr/lib/jellyfin/bin/jellyfin-web
|
||||||
|
msg_ok "Created Service"
|
||||||
|
|
||||||
PASS=$(grep -w "root" /etc/shadow | cut -b6);
|
PASS=$(grep -w "root" /etc/shadow | cut -b6);
|
||||||
if [[ $PASS != $ ]]; then
|
if [[ $PASS != $ ]]; then
|
||||||
msg_info "Customizing Container"
|
msg_info "Customizing Container"
|
||||||
|
@ -97,6 +117,8 @@ ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,3840
|
||||||
EOF
|
EOF
|
||||||
systemctl daemon-reload
|
systemctl daemon-reload
|
||||||
systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//')
|
systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//')
|
||||||
|
systemctl enable --now snowflake.service
|
||||||
|
|
||||||
msg_ok "Customized Container"
|
msg_ok "Customized Container"
|
||||||
msg_info "Cleaning up"
|
msg_info "Cleaning up"
|
||||||
apt-get autoremove >/dev/null
|
apt-get autoremove >/dev/null
|
||||||
|
|
Loading…
Reference in a new issue